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
In TiDB we have a global variable called tidb_persist_analyze_options, the default value is true, and it will help us to store the analyze options in the system table mysql.analyze_options.
We know that the Predicate Columns collection feature relies on this system to store the column selection. So if we set tidb_persist_analyze_options to false, the predicate column feature won't work anymore. Every time you need to explicitly ANALYZE TABLE table_name PREDICATE COLUMNS to make sure TiDB only analyses the predicate columns, otherwise auto-analyze it will keep analysing all columns.
Enhancement
In TiDB we have a global variable called tidb_persist_analyze_options, the default value is true, and it will help us to store the analyze options in the system table mysql.analyze_options.
We know that the Predicate Columns collection feature relies on this system to store the column selection. So if we set tidb_persist_analyze_options to false, the predicate column feature won't work anymore. Every time you need to explicitly ANALYZE TABLE table_name PREDICATE COLUMNS to make sure TiDB only analyses the predicate columns, otherwise auto-analyze it will keep analysing all columns.
Test Result
``sql
create table t(a int);
insert into t values(1);
ANALYZE TABLE t PREDICATE COLUMNS;
mysql> select * from mysql.analyze_options;
Empty set (0.01 sec)
ANALYZE TABLE t;
The text was updated successfully, but these errors were encountered: