diff --git a/faq/sql-faq.md b/faq/sql-faq.md index 55233aefbda74..34b83fed00e70 100644 --- a/faq/sql-faq.md +++ b/faq/sql-faq.md @@ -229,11 +229,9 @@ You can combine the above two parameters with the DML of TiDB to use them. For e ## What's the trigger strategy for `auto analyze` in TiDB? -Trigger strategy: `auto analyze` is automatically triggered when the number of rows in a new table reaches 1000 and this table has no write operation within one minute. +When the number of rows in a new table reaches 1000, and the ratio (the number of modified rows / the current total number of rows) is larger than `tidb_auto_analyze_ratio`, the [`ANALYZE`](/sql-statements/sql-statement-analyze-table.md) statement is automatically triggered. The default value of `tidb_auto_analyze_ratio` is `0.5`, indicating that this feature is enabled by default. To ensure safety, its minimum value is `0.3` when the feature is enabled, and it must be smaller than `pseudo-estimate-ratio` whose default value is `0.8`; otherwise pseudo statistics will be used for a period of time. It is recommended to set `tidb_auto_analyze_ratio` to `0.5`. -When the ratio (the number of modified rows / the current total number of rows) is larger than `tidb_auto_analyze_ratio`, the `analyze` statement is automatically triggered. The default value of `tidb_auto_analyze_ratio` is 0.5, indicating that this feature is enabled by default. To ensure safety, its minimum value is 0.3 when the feature is enabled, and it must be smaller than `pseudo-estimate-ratio` whose default value is 0.8, otherwise pseudo statistics will be used for a period of time. It is recommended to set `tidb_auto_analyze_ratio` to 0.5. - -To disable auto analyze, use the system variable `tidb_enable_auto_analyze`. +To disable `auto analyze`, use the system variable `tidb_enable_auto_analyze`. ## Can I use optimizer hints to override the optimizer behavior? diff --git a/foreign-key.md b/foreign-key.md index 8ddfe2fd39b9a..4ecb881ca4f19 100644 --- a/foreign-key.md +++ b/foreign-key.md @@ -305,7 +305,7 @@ Create Table | CREATE TABLE `child` ( - [TiDB Binlog](/tidb-binlog/tidb-binlog-overview.md) does not support foreign keys. -- [DM](/dm/dm-overview.md) does not support foreign keys. DM v6.6.0 disables the [`foreign_key_checks`](/system-variables.md#foreign_key_checks) of the downstream TiDB when replicating data to TiDB. Therefore, the cascading operations caused by foreign keys are not replicated from the upstream to the downstream, which might cause data inconsistency. This behavior is consistent with the previous DM versions. +- [DM](/dm/dm-overview.md) does not support foreign keys. DM disables the [`foreign_key_checks`](/system-variables.md#foreign_key_checks) of the downstream TiDB when replicating data to TiDB. Therefore, the cascading operations caused by foreign keys are not replicated from the upstream to the downstream, which might cause data inconsistency. - [TiCDC](/ticdc/ticdc-overview.md) v6.6.0 is compatible with foreign keys. The previous versions of TiCDC might report an error when replicating tables with foreign keys. It is recommended to disable the `foreign_key_checks` of the downstream TiDB cluster when using a TiCDC version earlier than v6.6.0. - [BR](/br/backup-and-restore-overview.md) v6.6.0 is compatible with foreign keys. The previous versions of BR might report an error when restoring tables with foreign keys to a v6.6.0 or later cluster. It is recommended to disable the `foreign_key_checks` of the downstream TiDB cluster before restoring the cluster when using a BR earlier than v6.6.0. - When you use [TiDB Lightning](/tidb-lightning/tidb-lightning-overview.md), it is recommended to disable the `foreign_key_checks` of the downstream TiDB cluster before importing data.