-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
16 changed files
with
417 additions
and
155 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
CREATE TABLE `outdated_statistics` ( | ||
`a` int, | ||
`b` int, | ||
`c` int, | ||
INDEX idx_a(a), | ||
INDEX idx_ab(a,b) | ||
); | ||
insert into outdated_statistics values (2, 2, 2); | ||
insert into outdated_statistics values (3, 3, 3); | ||
insert into outdated_statistics values (4, 4, 4); | ||
analyze table outdated_statistics; | ||
insert into outdated_statistics values (1, 1, 1); | ||
insert into outdated_statistics values (1, 2, 2); | ||
insert into outdated_statistics values (1, 3, 3); | ||
analyze table outdated_statistics index idx_ab; | ||
explain select * from outdated_statistics where a=1 and b=1 and c=1; | ||
id count task operator info | ||
IndexLookUp_11 0.00 root | ||
├─IndexScan_8 1.00 cop table:outdated_statistics, index:a, b, range:[1 1,1 1], keep order:false | ||
└─Selection_10 0.00 cop eq(test.outdated_statistics.c, 1) | ||
└─TableScan_9 1.00 cop table:outdated_statistics, keep order:false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.