Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use_index_merge hint does not take effect for MV index #50553

Closed
seiya-annie opened this issue Jan 18, 2024 · 0 comments · Fixed by #50572 or #50781
Closed

use_index_merge hint does not take effect for MV index #50553

seiya-annie opened this issue Jan 18, 2024 · 0 comments · Fixed by #50572 or #50781
Assignees
Labels
affects-7.1 This bug affects the 7.1.x(LTS) versions. affects-7.5 This bug affects the 7.5.x(LTS) versions. affects-7.6 feature/developing the related feature is in development severity/major sig/planner SIG: Planner type/bug The issue is confirmed as a bug.

Comments

@seiya-annie
Copy link

seiya-annie commented Jan 18, 2024

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

explain SELECT /*+ use_index_merge(items, feed_profile_ids), IGNORE_PLAN_CACHE() */
  *
FROM
  items
WHERE
  57260686 member of (feed_profile_ids)
  AND "OC8p1763XTk" member of (normalized_short_link_clusters)
  AND json_overlaps(
    product_sources,
    '["M1","M2","M3"]'
  )
LIMIT
  100 ;

2. What did you expect to see? (Required)

use feed_profile_ids index

3. What did you see instead (Required)

use normalized_short_link_clusters index

+------------------------------------+---------+-----------+--------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| id                                 | estRows | task      | access object                                                                                                                        | operator info                                                                                                                                                              |
+------------------------------------+---------+-----------+--------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Limit_10                           | 0.00    | root      |                                                                                                                                      | offset:0, count:1                                                                                                                                                          |
| └─Selection_11                 | 0.00    | root      |                                                                                                                                      | json_overlaps(test.items.product_sources, cast("["M1","M2","M3"]", json BINARY))                                                         |
|   └─IndexMerge_18              | 0.00    | root      |                                                                                                                                      | type: union                                                                                                                                                                |
|     ├─IndexRangeScan_15(Build) | 10.85   | cop[tikv] | table:items, index:normalized_short_link_clusters(cast(`normalized_short_link_clusters` as char(1000) array), point_of_sale_country) | range:["OC8p1763XTkt","OC8p1763XTkt"], keep order:false, stats:partial[normalized_short_link_clusters:unInitialized, feed_profile_ids:unInitialized] |
|     └─Selection_17(Probe)      | 0.00    | cop[tikv] |                                                                                                                                      | json_memberof(cast(57260686, json BINARY), test.items.feed_profile_ids)                                                                                                    |
|       └─TableRowIDScan_16      | 10.85   | cop[tikv] | table:items                                                                                                                          | keep order:false, stats:partial[normalized_short_link_clusters:unInitialized, feed_profile_ids:unInitialized]                                                              |
+------------------------------------+---------+-----------+--------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
6 rows in set, 9 warnings (0.00 sec)

4. What is your TiDB version? (Required)

7.6.0-pre 42960c3

@seiya-annie seiya-annie added the type/bug The issue is confirmed as a bug. label Jan 18, 2024
@seiya-annie seiya-annie changed the title use_index_merge hint does not take effect use_index_merge hint does not take effect for MV index Jan 18, 2024
@seiya-annie seiya-annie added the feature/developing the related feature is in development label Jan 18, 2024
@AilinKid AilinKid added affects-7.1 This bug affects the 7.1.x(LTS) versions. affects-7.5 This bug affects the 7.5.x(LTS) versions. and removed may-affects-5.4 This bug maybe affects 5.4.x versions. may-affects-6.1 may-affects-6.5 may-affects-7.1 may-affects-7.5 labels Jan 18, 2024
ti-chi-bot bot pushed a commit that referenced this issue Jan 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-7.1 This bug affects the 7.1.x(LTS) versions. affects-7.5 This bug affects the 7.5.x(LTS) versions. affects-7.6 feature/developing the related feature is in development severity/major sig/planner SIG: Planner type/bug The issue is confirmed as a bug.
Projects
None yet
3 participants