What are the differences between the index merge feature in TiDB and MySQL?

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: index merge 功能跟mysql 的有啥不一样吗

| username: 海石花47

I recently discovered that MySQL has long supported the index merge feature. Can the experts here tell me what are the differences between this feature in MySQL and TiDB?

| username: 海石花47 | Original post link

Is anyone here…

| username: 海石花47 | Original post link

Experts, hasn’t anyone looked into this feature in detail?

| username: xfworld | Original post link

MySQL is a standalone database.
TiDB is a distributed database, HTAP.

The indexing capabilities are definitely different, and the merging process is even more distinct. If you want to study it in detail, you can set a goal, find a scenario to conduct comparative testing, and then write a post to share the process and results.

I would be very much looking forward to it. :+1::+1::+1:

| username: 啦啦啦啦啦 | Original post link

Index merge in MySQL is quite common, and the optimizer’s choices will differ between the two. For TiDB’s index merge, refer to this link:

| username: 海石花47 | Original post link

It’s a bit difficult… I’m a beginner.

| username: 考试没答案 | Original post link

Understanding index merging: There are two indexes on the table that exactly meet your data requirements. By using these two indexes, you can speed up the process.

| username: 考试没答案 | Original post link

The data requirements are: 1. All through the index 2. Join conditions. What I encountered is equivalent to treating two indexes as one index.

| username: 海石花47 | Original post link

So, all index merge scenarios are single-table query situations, right?

| username: 考试没答案 | Original post link

It should be, otherwise how can the index be associated?

| username: 海石花47 | Original post link

Could you please provide the link to the screenshot article?

| username: 考试没答案 | Original post link

http://events.jianshu.io/p/1c00dc8be14a

| username: 考试没答案 | Original post link

For MySQL, you can refer to the official documentation. You can also check out the official documentation for TiDB. They are almost all imitations.

| username: 考试没答案 | Original post link

用 EXPLAIN 查看索引合并的 SQL 执行计划 | PingCAP 文档中心 TiDB official documentation link

| username: 海石花47 | Original post link

Yes, I have read this article~ I will take a closer look at the MySQL rules, thank you.

| username: system | Original post link

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.