Skip to content

Tracking issue: Refresh Stats Command #61273

@0xPoe

Description

@0xPoe

Guide-level explanation
This command looks as follows:

REFRESH STATS <TARGETS> [FULL | LITE] [CLUSTER] 
REFRESH STATS db1.tab1, tab2, db2.*, *.*, 
  • takes a list of targets separated by comma, which can be any of the following formats.
    • tab1: tab1 under current schema.
    • db.tab1: particular tables
    • db.* : all tables under schema db
    • *.*: all tables in this cluster
  • [FULL | LITE] names the type of loading initial statistics.
  • If [CLUSTER] is set, initialization of statistics happens for all TiDB instances. Otherwise, initialization happens to the TiDB instance connected only.
    Any users, including BR, with read permissions to the tables, can use this command to initialize the stats for the table.

Metadata

Metadata

Assignees

Labels

type/feature-requestCategorizes issue or PR as related to a new feature.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions