mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
bug #27531: 5.1 part of the fix:
- added join cache indication in EXPLAIN (Extra column). - prefer filesort over full scan over index for ORDER BY (because it's faster). - when switching from REF to RANGE because RANGE uses longer key turn off sort on the head table only as the resulting RANGE access is a candidate for join cache and we don't want to disable it by sorting on the first table only.
This commit is contained in:
@ -163,7 +163,7 @@ min(7)
|
||||
7
|
||||
explain select min(7) from t2i join t1i;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2i ALL NULL NULL NULL NULL 1
|
||||
1 SIMPLE t2i ALL NULL NULL NULL NULL 1 Using join cache
|
||||
1 SIMPLE t1i ALL NULL NULL NULL NULL 1
|
||||
select min(7) from t2i join t1i;
|
||||
min(7)
|
||||
@ -179,7 +179,7 @@ max(7)
|
||||
7
|
||||
explain select max(7) from t2i join t1i;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2i ALL NULL NULL NULL NULL 1
|
||||
1 SIMPLE t2i ALL NULL NULL NULL NULL 1 Using join cache
|
||||
1 SIMPLE t1i ALL NULL NULL NULL NULL 1
|
||||
select max(7) from t2i join t1i;
|
||||
max(7)
|
||||
|
Reference in New Issue
Block a user