From fda70213d08c50906e07f45de594c294c1e30116 Mon Sep 17 00:00:00 2001 From: Frank945946 <108602632+Frank945946@users.noreply.github.com> Date: Thu, 26 Dec 2024 19:07:36 +0800 Subject: [PATCH] Update the limitations of schema-cache --- schema-cache.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/schema-cache.md b/schema-cache.md index da45dab0930ad..dcadb1fb06f98 100644 --- a/schema-cache.md +++ b/schema-cache.md @@ -23,6 +23,9 @@ You can enable the schema caching feature by configuring the system variable [`t In scenarios with a large number of databases and tables, the following known issues exist: +- The number of tables in a single cluster cannot exceed 3 million. +- When the number of tables in a single cluster exceeds 300,000, do not set the value of [`tidb_schema_cache_size`](/system-variables.md#tidb_schema_cache_size-new-in-v800) to 0, as it may cause TiDB to run out of memory (OOM). +- When using foreign keys, the execution time of DDL operations in the cluster may increase. - When the tables are irregularly accessed, such as one set of tables are accessed at time1 while another set are accessed at time2, and the value of `tidb_schema_cache_size` is small, the schema information might be frequently evicted and cached, leading to performance fluctuations. This feature is more suitable for scenarios where frequently accessed databases and tables are relatively fixed. - Statistics information might not be collected in a timely manner. - Access to some metadata information might become slower.