We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
before
"SQL": "explain format = 'brief' select /*+ use_index(t, kj) */ * from t where json_contains(j, '[1, 2, 3]') limit 1; -- index merge intersection case, sink limit into table side", "Plan": [ "Limit 1.00 root offset:0, count:1", "└─IndexMerge 0.00 root type: intersection", " ├─IndexRangeScan(Build) 0.00 cop[tikv] table:t, index:kj(cast(`j` as signed array)) range:[1,1], keep order:false, stats:pseudo", " ├─IndexRangeScan(Build) 0.00 cop[tikv] table:t, index:kj(cast(`j` as signed array)) range:[2,2], keep order:false, stats:pseudo", " ├─IndexRangeScan(Build) 0.00 cop[tikv] table:t, index:kj(cast(`j` as signed array)) range:[3,3], keep order:false, stats:pseudo", " └─Limit(Probe) 0.00 cop[tikv] offset:0, count:1", " └─TableRowIDScan 0.00 cop[tikv] table:t keep order:false, stats:pseudo"
after
"SQL": "explain format = 'brief' select /*+ use_index(t, kj) */ * from t where json_contains(j, '[1, 2, 3]') limit 1; -- index merge intersection case, embedding limit into index merge reader", "Plan": [ "IndexMerge 0.00 root type: intersection, limit embedded(offset:0, count:1)", "├─IndexRangeScan(Build) 0.00 cop[tikv] table:t, index:kj(cast(`j` as signed array)) range:[1,1], keep order:false, stats:pseudo", "├─IndexRangeScan(Build) 0.00 cop[tikv] table:t, index:kj(cast(`j` as signed array)) range:[2,2], keep order:false, stats:pseudo", "├─IndexRangeScan(Build) 0.00 cop[tikv] table:t, index:kj(cast(`j` as signed array)) range:[3,3], keep order:false, stats:pseudo", "└─TableRowIDScan(Probe) 0.00 cop[tikv] table:t keep order:false, stats:pseudo"
The text was updated successfully, but these errors were encountered:
planner: add limit control for intersection case of index merge reader (
3ad4f74
#46862) close #46863
a55fee1
pingcap#46862) close pingcap#46863
AilinKid
Successfully merging a pull request may close this issue.
Enhancement
before
after
The text was updated successfully, but these errors were encountered: