| 1 |
TRUNCATE TABLE test_innodb_stats; |
| 2 |
|
| 3 |
-- eval $insert |
| 4 |
|
| 5 |
ANALYZE TABLE test_innodb_stats; |
| 6 |
|
| 7 |
query_vertical SELECT |
| 8 |
stat_name, |
| 9 |
stat_value, |
| 10 |
sample_size, |
| 11 |
stat_description |
| 12 |
FROM mysql.innodb_index_stats |
| 13 |
WHERE |
| 14 |
database_name = DATABASE() AND |
| 15 |
table_name = 'test_innodb_stats' AND |
| 16 |
index_name = 'a_key' AND |
| 17 |
stat_name IN ('n_diff_pfx01', 'n_diff_pfx02', 'n_leaf_pages', 'size') |
| 18 |
ORDER BY stat_name; |
| 19 |
|
| 20 |
# provoke reading from persistent storage upon next table access (the SELECT |
| 21 |
# from information_schema.statistics below) |
| 22 |
FLUSH TABLE test_innodb_stats; |
| 23 |
|
| 24 |
# see what we are going to read |
| 25 |
query_vertical SELECT * FROM information_schema.statistics |
| 26 |
WHERE table_name = 'test_innodb_stats'; |