mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
MDEV-7118: Anemometer stop working after upgrade to from...
When the optimizer considers an option to use Loose Scan, it should still consider UNIQUE keys (Previously, MDEV-4120 disabled loose scan for all kinds of unique indexes. That was wrong) However, we should not use Loose Scan when trying to satisfy "SELECT DISTINCT col1, col2, .. colN" when using an index defined as UNIQU(col1, col2, ... colN).
This commit is contained in:
@ -174,7 +174,7 @@ F 17
|
||||
EXPLAIN SELECT c1, max(i2) FROM t1 WHERE (c1 = 'C' OR c1 = 'F' ) AND ( i2 = 17 )
|
||||
GROUP BY c1;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range k1 k1 5 NULL 2 Using where; Using index
|
||||
1 SIMPLE t1 range k1 k1 5 NULL 1 Using where; Using index for group-by
|
||||
SELECT c1, max(i2) FROM t1 WHERE (c1 = 'C' OR c1 = 'F' ) AND ( i2 = 17 )
|
||||
GROUP BY c1;
|
||||
c1 max(i2)
|
||||
|
Reference in New Issue
Block a user