You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bug#26197113 SLOW DYNAMIC TABLE STATISTICS RETRIVAL FROM I_S AFTER MYSQL-TRUNK-META-SYNC PUSH
Analysis:
If the table is not present in the cache then opening the table
takes lot of time and it leads to slow performance in information
schema queries.
Following changes are done to fix the issue,
InnoDB changes:
- Instead of opening the table, InnoDB can fetch the stats
information from innodb_table_stats and innodb_index_stats.
- Fetch the record from innodb_table_stats using db_name, table name
and it will give information about n_rows, clustered index_size and
sum of other index size.
- Fetch the space id from Tablespace SE private data for
general/system tablespace (or) Fetch the space id using db_name,
table_name from fil_space_t hash.
- Use the space_id to calculate the available length in the
tablespace.
- Maximum value of autoincremnt fetched from innodb_dynamic_metadata
using table id and autoincrement fetched from table_se_private data.
- Cardinality can be fetched from innodb_index_stats table using
db_name, table name, index name and column offset.
- If the table doesn't have persistent stats then InnoDB loads
the table from the disk.
Server changes:
- Supply mysql.tablespaces.se_private_data to internal functions
INTERNAL_*(), which is used by SE to read the SE specific tablespace
metadata when fetching table dynamic statistics. E.g., InnoDB would
read the SE specific space_id from se_private_data column.
- INFORMATION_SCHEMA.TABLES system view is now joined with
mysql.tablespaces, to get the mysql.tablespaces.se_private_data for a
table.
Reviewed-by: Jimmy Yang <[email protected]>
Reviewed-by: Bin Su <[email protected]>
Reviewed-by: Praveenkumar Hulakund <[email protected]>
RB: 16467
0 commit comments