mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
MDEV-33151 Add more columns to TABLE_STATISTICS and USER STATS
Columns added to TABLE_STATISTICS - ROWS_INSERTED, ROWS_DELETED, ROWS_UPDATED, KEY_READ_HITS and KEY_READ_MISSES. Columns added to CLIENT_STATISTICS and USER_STATISTICS: - KEY_READ_HITS and KEY_READ_MISSES. User visible changes (except new columns): - CLIENT_STATISTICS and USER_STATISTICS has columns KEY_READ_HITS and KEY_READ_MISSES added after column ROWS_UPDATED before SELECT_COMMANDS. Other changes: - Do not collect table statistics for system tables like index_stats table_stats, performance_schema, information_schema etc as the user has no control of these and the generate noice in the statistics. - All row variables that are part of user_stats are moved to 'struct rows_stats' to make it easy to clear all of them at once. - ha_read_key_misses added to STATUS_VAR Notes: - userstat.result has a change of numbers of rows for handler_read_key. This is because use-stat-tables is now disabled for the test.
This commit is contained in:
@ -7128,9 +7128,10 @@ MIN(b)
|
||||
NULL
|
||||
# The following shows that t2 was indeed scanned with a full scan.
|
||||
show table_statistics;
|
||||
Table_schema Table_name Rows_read Rows_changed Rows_changed_x_#indexes
|
||||
test t1 2 0 0
|
||||
test t2 3 0 0
|
||||
Table_schema Table_name Rows_read Rows_changed Rows_changed_x_#indexes Rows_inserted Rows_updated Rows_deleted Key_read_hits Key_read_misses
|
||||
test t1 2 0 0 0 0 0 0 0
|
||||
test t2 3 0 0 0 0 0 1 0
|
||||
test t3 0 0 0 0 0 0 0 1
|
||||
show index_statistics;
|
||||
Table_schema Table_name Index_name Rows_read Queries
|
||||
test t2 b 1 1
|
||||
|
Reference in New Issue
Block a user