mirror of
https://github.com/MariaDB/server.git
synced 2025-09-02 09:41:40 +03:00
Fixed bug#35844.
The function test_if_skip_sort_order ignored any covering index used for ref access of a table in a query with ORDER BY if this index was incompatible with the ORDER BY list and there was another covering index compatible with this list. As a result sub-optimal execution plans were chosen for some queries with ORDER BY clause.
This commit is contained in:
@@ -694,7 +694,7 @@ INSERT INTO t1(a, b, c) VALUES (1, 1, 1),
|
||||
(1, 2, 3);
|
||||
EXPLAIN SELECT DISTINCT a, b, d, c FROM t1;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index NULL a 16 NULL 6 Using index
|
||||
1 SIMPLE t1 range NULL PRIMARY 16 NULL 7 Using index for group-by; Using temporary
|
||||
SELECT DISTINCT a, b, d, c FROM t1;
|
||||
a b d c
|
||||
1 1 0 1
|
||||
|
Reference in New Issue
Block a user