--source include/have_innodb.inc
|
|
set @@optimizer_use_condition_selectivity=4;
|
set @@use_stat_tables=PREFERABLY;
|
|
create table t1 (a int)engine=InnoDB;
|
insert into t1 values (1),(1),(2),(3);
|
|
MariaDB [test]> analyze table t1;
|
+---------+---------+----------+-----------------------------------------+
|
| Table | Op | Msg_type | Msg_text |
|
+---------+---------+----------+-----------------------------------------+
|
| test.t1 | analyze | status | Engine-independent statistics collected |
|
| test.t1 | analyze | status | OK |
|
+---------+---------+----------+-----------------------------------------+
|
|
alter table t1 change a b int;
|
|
MariaDB [test]> analyze table t1;
|
+---------+---------+----------+----------------------------------------------------+
|
| Table | Op | Msg_type | Msg_text |
|
+---------+---------+----------+----------------------------------------------------+
|
| test.t1 | analyze | status | Engine-independent statistics collected |
|
| test.t1 | analyze | Note | Data truncated for column 'avg_frequency' at row 1 |
|
| test.t1 | analyze | status | OK |
|
+---------+---------+----------+----------------------------------------------------+
|
|
select * from mysql.column_stats;
|
drop table t1;
|