1
0
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:
Sergey Petrunya
2014-11-19 17:14:49 +03:00
parent 416f267a7a
commit 00475d40d1
4 changed files with 19 additions and 7 deletions

View File

@ -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)