Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
12.0
Description
(This is likely to to affect other versions also)
create table t1 (a int, b int, key(a)); |
insert into t1 select seq,seq from seq_1_to_10000; |
explain with T as (select a, b from t1 order by a limit 10) select * from T;
|
+------+-------------+------------+-------+---------------+------+---------+------+-------+-------+
|
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
|
+------+-------------+------------+-------+---------------+------+---------+------+-------+-------+
|
| 1 | PRIMARY | <derived2> | ALL | NULL | NULL | NULL | NULL | 10 | |
|
| 2 | DERIVED | t1 | index | NULL | a | 5 | NULL | 10157 | |
|
+------+-------------+------------+-------+---------------+------+---------+------+-------+-------+
|
when running the derived table's SELECT on its own:
explain select a, b from t1 order by a limit 10;
|
+------+-------------+-------+-------+---------------+------+---------+------+------+-------+
|
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
|
+------+-------------+-------+-------+---------------+------+---------+------+------+-------+
|
| 1 | SIMPLE | t1 | index | NULL | a | 5 | NULL | 10 | |
|
+------+-------------+-------+-------+---------------+------+---------+------+------+-------+
|
Attachments
Issue Links
- relates to
-
MDEV-35970 streaming window functions
-
- Needs Feedback
-