Skip to content

Commit

Permalink
add some point desc (#10599)
Browse files Browse the repository at this point in the history
  • Loading branch information
Oreoxmt authored Sep 30, 2022
1 parent a952bbe commit ec83f3c
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions statistics.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,14 @@ For TiDB Cloud, the default value of this variable is `1`.
>
> - If the `ANALYZE` statement is executed manually, manually analyze every table to be analyzed.
>
> {{< copyable "sql" >}}
>
> ```sql
> select distinct(concat('ANALYZE ',table_schema, '.', table_name,';')) from information_schema.tables, mysql.stats_histograms where stats_ver = 2 and table_id = tidb_table_id ;
> SELECT DISTINCT(CONCAT('ANALYZE TABLE', table_schema, '.', table_name, ';')) FROM information_schema.tables, mysql.stats_histograms WHERE stats_ver = 2 AND table_id = tidb_table_id;
> ```
>
> - If TiDB automatically executes the `ANALYZE` statement because the auto-analysis has been enabled, execute the following statement that generates the `DROP STATS` statement:
>
> {{< copyable "sql" >}}
>
> ```sql
> select distinct(concat('DROP STATS ',table_schema, '.', table_name,';')) from information_schema.tables, mysql.stats_histograms where stats_ver = 2 and table_id = tidb_table_id ;
> SELECT DISTINCT(CONCAT('DROP STATS ', table_schema, '.', table_name, ';')) FROM information_schema.tables, mysql.stats_histograms WHERE stats_ver = 2 AND table_id = tidb_table_id;
> ```
These two versions include different information in TiDB:
Expand Down

0 comments on commit ec83f3c

Please sign in to comment.