TiDBTiDB Docs Dash 2024

Jan 9 - Jan 12 (UTC)
Join us to improve docs and win a prize!
Sign InTry Free

LOAD STATS

The LOAD STATS statement is used to load the statistics into TiDB.

Synopsis

LoadStatsStmt
LOADSTATSstringLit

Examples

You can access the address http://${tidb-server-ip}:${tidb-server-status-port}/stats/dump/${db_name}/${table_name} to download the TiDB instance's statistics.

You can also use LOAD STATS ${stats_path} to load the specific statistics file.

The ${stats_path} can be an absolute path or a relative path. If you use a relative path, the corresponding file is found starting from the path where tidb-server is started. Here is an example:

LOAD STATS '/tmp/stats.json';
Query OK, 0 rows affected (0.00 sec)

MySQL compatibility

This statement is a TiDB extension to MySQL syntax.

See also

Was this page helpful?

Download PDFRequest docs changesAsk questions on Discord
Playground
New
One-stop & interactive experience of TiDB's capabilities WITHOUT registration.
Products
TiDB
TiDB Dedicated
TiDB Serverless
Pricing
Get Demo
Get Started
© 2024 PingCAP. All Rights Reserved.
Privacy Policy.