mirror of
https://github.com/MariaDB/server.git
synced 2026-03-09 01:48:42 +01:00
12 lines
465 B
Text
12 lines
465 B
Text
create table t (c int);
|
|
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 vc from t order by c + 1;
|
|
id select_type table type possible_keys key key_len ref rows Extra
|
|
1 SIMPLE t index NULL vc 5 NULL 10000 Using index
|
|
explain select vc from t order by c + 1 limit 10;
|
|
id select_type table type possible_keys key key_len ref rows Extra
|
|
1 SIMPLE t index NULL vc 5 NULL 10 Using index
|
|
drop table t;
|