Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
-
12.1
-
None
-
Related to performance
-
part of
MDEV-36132 -
Q3/2025 Maintenance
Description
In case:
--source include/have_sequence.inc
|
|
create table t (c int, key (c)); |
insert into t select seq from seq_1_to_10000; |
alter table t |
add column vc int as (c + 1), |
add index(vc); |
|
explain select * from t order by c + 1 limit 2; |
explain delete from t order by c + 1 limit 2; |
|
drop table t; |
new changes from MDEV-36132 work for SELECT:
explain select * from t order by c + 1 limit 2; |
id select_type table type possible_keys key key_len ref rows Extra |
1 SIMPLE t index NULL vc 5 NULL 2 |
but do not work for DELETE:
explain delete from t order by c + 1 limit 2; |
id select_type table type possible_keys key key_len ref rows Extra |
1 SIMPLE t ALL NULL NULL NULL NULL 10000 Using filesort |
Attachments
Issue Links
- is blocked by
-
MDEV-36132 Optimizer support for functional indexes: handle GROUP/ORDER BY
-
- Closed
-
- is caused by
-
MDEV-36132 Optimizer support for functional indexes: handle GROUP/ORDER BY
-
- Closed
-
- split to
-
MDEV-37252 UPDATE chooses full table scan when ORDER BY keys are also columns to update
-
- Closed
-