diff options
author | unknown <timour@askmonty.org> | 2013-08-21 10:51:08 +0300 |
---|---|---|
committer | unknown <timour@askmonty.org> | 2013-08-21 10:51:08 +0300 |
commit | 33c66eb7fbcddb09217820708e8ce9324e65db11 (patch) | |
tree | d47664559ef685ddf59455191e4859959cd4581e /mysql-test/r/group_by.result | |
parent | 3c75146052711bcc829ede488536f70782a34ab0 (diff) | |
download | mariadb-git-33c66eb7fbcddb09217820708e8ce9324e65db11.tar.gz |
MDEV-4120: UNIQUE indexes should not be considered for loose index scan
Currently the loose scan code in opt_range.cc considers all indexes as
possible for the access method. Due to inexact statistics it may happen
that a loose scan is selected over a unique index.
This is clearly wrong since a "loose scan" over a unique index will read
the same keys as a direct index scan, but the loose scan has more overhead.
This task adds a rule to skip unique indexes for loose scan.
Diffstat (limited to 'mysql-test/r/group_by.result')
-rw-r--r-- | mysql-test/r/group_by.result | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mysql-test/r/group_by.result b/mysql-test/r/group_by.result index 8ca2762b190..d06d0e51a56 100644 --- a/mysql-test/r/group_by.result +++ b/mysql-test/r/group_by.result @@ -2080,7 +2080,7 @@ f1 f2 explain select col1 f1, col1 f2 from t1 group by f2 order by f2, f1; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range NULL idx 5 NULL 7 Using index for group-by; Using temporary; Using filesort +1 SIMPLE t1 index NULL idx 5 NULL 20 Using index; Using temporary; Using filesort select col1 f1, col1 f2 from t1 group by f2 order by f2, f1; f1 f2 1 1 |