Skip to content

Commit c713607

Browse files
Null not nilyikekezz-jason
authored
system-databases: Refactor/Improve clarity (pingcap#3178)
* WIP - refactor system tables * Add missing items * WIP * Add redirects from old locations * Split information_schema table * Remove category meta data from files * Update .github/assign-by-files.yml Co-authored-by: Keke Yi <[email protected]> * Update information-schema.md Co-authored-by: Keke Yi <[email protected]> * Update information-schema/information-schema-metrics-tables.md Co-authored-by: Keke Yi <[email protected]> * Update mysql-schema.md Co-authored-by: Keke Yi <[email protected]> * Update mysql-schema.md Co-authored-by: Keke Yi <[email protected]> * Manual merge conflicts from master * Update information-schema/information-schema-collations.md Co-authored-by: Zhang Jian <[email protected]> * Update information-schema/information-schema-collation-character-set-applicability.md Co-authored-by: Zhang Jian <[email protected]> Co-authored-by: Keke Yi <[email protected]> Co-authored-by: Zhang Jian <[email protected]>
1 parent e0e0f30 commit c713607

File tree

53 files changed

+2280
-1443
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+2280
-1443
lines changed

.github/assign-by-files.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,9 @@
8383
# - TomShawn
8484
# -
8585

86-
# 'system-tables/**/*.md':
87-
# - TomShawn
88-
# -
86+
'information-schema/**/*.md':
87+
- TomShawn
88+
- nullnotnil
8989

9090
'ticdc/**/*.md':
9191
- WangXiangUSTC

TOC.md

+43-15
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
+ Troubleshoot
8282
+ [TiDB Troubleshooting Map](/tidb-troubleshooting-map.md)
8383
+ [Identify Slow Queries](/identify-slow-queries.md)
84-
+ [SQL Diagnostics](/system-tables/system-table-sql-diagnostics.md)
84+
+ [SQL Diagnostics](/information-schema/information-schema-sql-diagnostics.md)
8585
+ [Identify Expensive Queries](/identify-expensive-queries.md)
8686
+ [Statement Summary Tables](/statement-summary-tables.md)
8787
+ [Troubleshoot Hotspot Issues](/troubleshoot-hot-spot-issues.md)
@@ -378,20 +378,48 @@
378378
+ [Partitioning](/partitioned-table.md)
379379
+ [Character Set and Collation](/character-set-and-collation.md)
380380
+ System Tables
381-
+ [`mysql`](/system-tables/system-table-overview.md)
382-
+ [`information_schema`](/system-tables/system-table-information-schema.md)
383-
+ sql-diagnosis
384-
+ [`cluster_info`](/system-tables/system-table-cluster-info.md)
385-
+ [`cluster_hardware`](/system-tables/system-table-cluster-hardware.md)
386-
+ [`cluster_config`](/system-tables/system-table-cluster-config.md)
387-
+ [`cluster_load`](/system-tables/system-table-cluster-load.md)
388-
+ [`cluster_systeminfo`](/system-tables/system-table-cluster-systeminfo.md)
389-
+ [`cluster_log`](/system-tables/system-table-cluster-log.md)
390-
+ [`metrics_schema`](/system-tables/system-table-metrics-schema.md)
391-
+ [`metrics_tables`](/system-tables/system-table-metrics-tables.md)
392-
+ [`metrics_summary`](/system-tables/system-table-metrics-summary.md)
393-
+ [`inspection_result`](/system-tables/system-table-inspection-result.md)
394-
+ [`inspection_summary`](/system-tables/system-table-inspection-summary.md)
381+
+ [`mysql`](/mysql-schema.md)
382+
+ `INFORMATION_SCHEMA`
383+
+ [Overview](/information-schema.md)
384+
+ [`ANALYZE_STATUS`](/information-schema/information-schema-analyze-status.md)
385+
+ [`CHARACTER_SETS`](/information-schema/information-schema-character-sets.md)
386+
+ [`CLUSTER_CONFIG`](/information-schema/information-schema-cluster-config.md)
387+
+ [`CLUSTER_HARDWARE`](/information-schema/information-schema-cluster-hardware.md)
388+
+ [`CLUSTER_INFO`](/information-schema/information-schema-cluster-info.md)
389+
+ [`CLUSTER_LOAD`](/information-schema/information-schema-cluster-load.md)
390+
+ [`CLUSTER_LOG`](/information-schema/information-schema-cluster-log.md)
391+
+ [`CLUSTER_SYSTEMINFO`](/information-schema/information-schema-cluster-systeminfo.md)
392+
+ [`COLLATIONS`](/information-schema/information-schema-collations.md)
393+
+ [`COLLATION_CHARACTER_SET_APPLICABILITY`](/information-schema/information-schema-collation-character-set-applicability.md)
394+
+ [`COLUMNS`](/information-schema/information-schema-columns.md)
395+
+ [`DDL_JOBS`](/information-schema/information-schema-ddl-jobs.md)
396+
+ [`ENGINES`](/information-schema/information-schema-engines.md)
397+
+ [`INSPECTION_RESULT`](/information-schema/information-schema-inspection-result.md)
398+
+ [`INSPECTION_RULES`](/information-schema/information-schema-inspection-rules.md)
399+
+ [`INSPECTION_SUMMARY`](/information-schema/information-schema-inspection-summary.md)
400+
+ [`KEY_COLUMN_USAGE`](/information-schema/information-schema-key-column-usage.md)
401+
+ [`METRICS_SUMMARY`](/information-schema/information-schema-metrics-summary.md)
402+
+ [`METRICS_TABLES`](/information-schema/information-schema-metrics-tables.md)
403+
+ [`PARTITIONS`](/information-schema/information-schema-partitions.md)
404+
+ [`PROCESSLIST`](/information-schema/information-schema-processlist.md)
405+
+ [`SCHEMATA`](/information-schema/information-schema-schemata.md)
406+
+ [`SEQUENCES`](/information-schema/information-schema-sequences.md)
407+
+ [`SESSION_VARIABLES`](/information-schema/information-schema-session-variables.md)
408+
+ [`SLOW_QUERY`](/information-schema/information-schema-slow-query.md)
409+
+ [`STATISTICS`](/information-schema/information-schema-statistics.md)
410+
+ [`TABLES`](/information-schema/information-schema-tables.md)
411+
+ [`TABLE_CONSTRAINTS`](/information-schema/information-schema-table-constraints.md)
412+
+ [`TABLE_STORAGE_STATS`](/information-schema/information-schema-table-storage-stats.md)
413+
+ [`TIDB_HOT_REGIONS`](/information-schema/information-schema-tidb-hot-regions.md)
414+
+ [`TIDB_INDEXES`](/information-schema/information-schema-tidb-indexes.md)
415+
+ [`TIDB_SERVERS_INFO`](/information-schema/information-schema-tidb-servers-info.md)
416+
+ [`TIFLASH_REPLICA`](/information-schema/information-schema-tiflash-replica.md)
417+
+ [`TIKV_REGION_PEERS`](/information-schema/information-schema-tikv-region-peers.md)
418+
+ [`TIKV_REGION_STATUS`](/information-schema/information-schema-tikv-region-status.md)
419+
+ [`TIKV_STORE_STATUS`](/information-schema/information-schema-tikv-store-status.md)
420+
+ [`USER_PRIVILEGES`](/information-schema/information-schema-user-privileges.md)
421+
+ [`VIEWS`](/information-schema/information-schema-views.md)
422+
+ [`METRICS_SCHEMA`](/metrics-schema.md)
395423
+ UI
396424
+ TiDB Dashboard
397425
+ [Overview](/dashboard/dashboard-intro.md)

_index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ Designed for the cloud, TiDB provides flexible scalability, reliability and secu
7878

7979
- [TiDB Troubleshooting Map](/tidb-troubleshooting-map.md)
8080
- [Identify Slow Queries](/identify-slow-queries.md)
81-
- [SQL Diagnostics](/system-tables/system-table-sql-diagnostics.md)
81+
- [SQL Diagnostics](/information-schema/information-schema-sql-diagnostics.md)
8282
- [Troubleshoot Hotspot Issues](/troubleshoot-hot-spot-issues.md)
8383
- [Troubleshoot the TiDB Cluster](/troubleshoot-tidb-cluster.md)
8484
- [Troubleshoot TiCDC](/ticdc/troubleshoot-ticdc.md)

check-cluster-status-using-sql-statements.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,18 @@ TiDB offers some SQL statements and system tables to check the TiDB cluster stat
1010

1111
The `INFORMATION_SCHEMA` system database offers system tables as follows to query the cluster status and diagnose common cluster issues:
1212

13-
- [`TABLES`](/system-tables/system-table-information-schema.md#tables-table)
14-
- [`TIDB_INDEXES`](/system-tables/system-table-information-schema.md#tidb_indexes-table)
15-
- [`ANALYZE_STATUS`](/system-tables/system-table-information-schema.md#analyze_status-table)
16-
- [`TIDB_HOT_REGIONS`](/system-tables/system-table-information-schema.md#tidb_hot_regions-table)
17-
- [`TIKV_STORE_STATUS`](/system-tables/system-table-information-schema.md#tikv_store_status-table)
18-
- [`TIKV_REGION_STATUS`](/system-tables/system-table-information-schema.md#tikv_region_status-table)
19-
- [`TIKV_REGION_PEERS`](/system-tables/system-table-information-schema.md#tikv_region_peers-table)
13+
- [`TABLES`](/information-schema/information-schema-tables.md)
14+
- [`TIDB_INDEXES`](/information-schema/information-schema-tidb-indexes.md)
15+
- [`ANALYZE_STATUS`](/information-schema/information-schema-analyze-status.md)
16+
- [`TIDB_HOT_REGIONS`](/information-schema/information-schema-tidb-hot-regions.md)
17+
- [`TIKV_STORE_STATUS`](/information-schema/information-schema-tikv-store-status.md)
18+
- [`TIKV_REGION_STATUS`](/information-schema/information-schema-tikv-region-status.md)
19+
- [`TIKV_REGION_PEERS`](/information-schema/information-schema-tikv-region-peers.md)
2020

2121
You can also use the following statements to obtain some useful information for troubleshooting and querying the TiDB cluster status.
2222

2323
- `ADMIN SHOW DDL`: obtains the ID of TiDB with the `DDL owner` role and `IP:PORT`.
24-
- The feature of `SHOW ANALYZE STATUS` is the same with that of [the `ANALYZE_STATUS` table](/system-tables/system-table-information-schema.md#analyze_status-table).
24+
- The feature of `SHOW ANALYZE STATUS` is the same with that of [the `ANALYZE_STATUS` table](/information-schema/information-schema-analyze-status.md).
2525
- Specific `EXPLAIN` statements
2626
- `EXPLAIN ANALYZE`: obtains some detailed information for execution of a SQL statement.
2727
- `EXPLAIN FOR CONNECTION`: obtains the execution plan for the query executed last in a connection. Can be used along with `SHOW PROCESSLIST`.

dashboard/dashboard-diagnostics-report.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ The fields in the table above are described as follows:
6262

6363
#### Cluster Topology Info
6464

65-
The `Cluster Info` table shows the cluster topology information. The information in this table are from TiDB [information_schema.cluster_info](/system-tables/system-table-cluster-info.md) system table.
65+
The `Cluster Info` table shows the cluster topology information. The information in this table are from TiDB [information_schema.cluster_info](/information-schema/information-schema-cluster-info.md) system table.
6666

6767
![Cluster info](/media/dashboard/dashboard-diagnostics-cluster-info.png)
6868

@@ -78,7 +78,7 @@ The fields in the table above are described as follows:
7878

7979
### Diagnostic information
8080

81-
TiDB has built-in automatic diagnostic results. For the description of each field, see [information_schema.inspection-result](/system-tables/system-table-inspection-result.md) system table.
81+
TiDB has built-in automatic diagnostic results. For the description of each field, see [information_schema.inspection-result](/information-schema/information-schema-inspection-result.md) system table.
8282

8383
### Load Info
8484

faq/tidb-faq.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -540,7 +540,7 @@ No. Currently, TiDB only supports the distributed storage engine and the Golevel
540540
541541
#### Can the `Information_schema` support more real information?
542542
543-
As part of MySQL compatibility, TiDB supports a number of `INFORMATION_SCHEMA` tables. Many of these tables also have a corresponding SHOW command. For more information, see [Information Schema](/system-tables/system-table-information-schema.md).
543+
As part of MySQL compatibility, TiDB supports a number of `INFORMATION_SCHEMA` tables. Many of these tables also have a corresponding SHOW command. For more information, see [Information Schema](/information-schema.md).
544544
545545
#### What's the explanation of the TiDB Backoff type scenario?
546546

identify-slow-queries.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ TiKV Coprocessor Task fields:
106106

107107
## Memory mapping in slow log
108108

109-
You can query the content of the slow query log by querying the `INFORMATION_SCHEMA.SLOW_QUERY` table. Each column name in the table corresponds to one field name in the slow log. For table structure, see the introduction to the `SLOW_QUERY` table in [Information Schema](/system-tables/system-table-information-schema.md#information-schema).
109+
You can query the content of the slow query log by querying the `INFORMATION_SCHEMA.SLOW_QUERY` table. Each column name in the table corresponds to one field name in the slow log. For table structure, see the introduction to the `SLOW_QUERY` table in [Information Schema](/information-schema/information-schema-slow-query.md).
110110

111111
> **Note:**
112112
>
@@ -158,7 +158,7 @@ For TiDB 4.0, `SLOW_QUERY` supports querying the slow log of any period of time,
158158
>
159159
> If the slow log files of the specified time range are removed, or there is no slow query, the query returns NULL.
160160

161-
TiDB 4.0 adds the [`CLUSTER_SLOW_QUERY`](/system-tables/system-table-information-schema.md#cluster_slow_query-table) system table to query the slow query information of all TiDB nodes. The table schema of the `CLUSTER_SLOW_QUERY` table differs from that of the `SLOW_QUERY` table in that an `INSTANCE` column is added to `CLUSTER_SLOW_QUERY`. The `INSTANCE` column represents the TiDB node address of the row information on the slow query. You can use `CLUSTER_SLOW_QUERY` the way you do with [`SLOW_QUERY`](/system-tables/system-table-information-schema.md#slow_query-table).
161+
TiDB 4.0 adds the [`CLUSTER_SLOW_QUERY`](/information-schema/information-schema-slow-query.md#cluster_slow_query-table) system table to query the slow query information of all TiDB nodes. The table schema of the `CLUSTER_SLOW_QUERY` table differs from that of the `SLOW_QUERY` table in that an `INSTANCE` column is added to `CLUSTER_SLOW_QUERY`. The `INSTANCE` column represents the TiDB node address of the row information on the slow query. You can use `CLUSTER_SLOW_QUERY` the way you do with [`SLOW_QUERY`](/information-schema/information-schema-slow-query.md).
162162

163163
When you query the `CLUSTER_SLOW_QUERY` table, TiDB pushes the computation and the judgment down to other nodes, instead of retrieving all slow query information from other nodes and executing the operations on one TiDB node.
164164

0 commit comments

Comments
 (0)