Is it recommended to enable index merge in TiDB?

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

Original topic: TiDB 中建议开启 index merge 吗?

| username: KaiNiao

[Test Environment for TiDB]
[TiDB Version] 6.5.0
[Reproduction Path] What operations were performed to encounter the issue
[Encountered Issue: Issue Phenomenon and Impact]

The official documentation states: In newly created clusters of version v5.4.0 and above, index merge is enabled by default.

It is generally not recommended to enable index_merge in MySQL. Is it recommended to enable it in TiDB? What is the reason?

[Resource Configuration]
[Attachments: Screenshots/Logs/Monitoring]

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

I personally suggest enabling it. In TiDB, besides full table scans, there are single index scan options or intersection index merges that the optimizer currently does not automatically choose. Usually, in such cases, it might cause the SQL to become slower in MySQL.

| username: 胡杨树旁 | Original post link

It is recommended to enable it. The index_merge can automatically be selected only after version 5.4.0.

| username: KaiNiao | Original post link

Okay, thank you, boss.

| username: KaiNiao | Original post link

:ok_hand: Thank you

| username: Kongdom | Original post link

This should be enabled by default, which means it is recommended by the official team. :grinning:

| username: KaiNiao | Original post link

Makes sense.

| username: liuis | Original post link

Recommend enabling

| username: 海石花47 | Original post link

Is MySQL’s index merge similar to TiDB’s index merge?

| username: system | Original post link

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