Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

system-databases: Refactor/Improve clarity #3178

Merged
merged 25 commits into from Jul 21, 2020
Merged
Show file tree
Hide file tree
Changes from 21 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
e940452
WIP - refactor system tables
Jul 6, 2020
73ef179
Merge remote-tracking branch 'upstream/master' into system-databases
Jul 6, 2020
b4f7751
Merge remote-tracking branch 'upstream/master' into system-databases
Jul 6, 2020
2d7e597
Merge branch 'system-databases' of github.com:nullnotnil/docs into sy…
Jul 6, 2020
2a4ca48
Add missing items
Jul 6, 2020
d2e6588
WIP
Jul 6, 2020
b46639c
Add redirects from old locations
Jul 7, 2020
fca81ca
Split information_schema table
Jul 7, 2020
e889868
Merge branch 'master' into system-databases
Jul 7, 2020
b730dbf
Merge branch 'master' into system-databases
Jul 10, 2020
92ecf6b
Remove category meta data from files
Jul 10, 2020
1f3f7f9
Merge remote-tracking branch 'upstream/master' into system-databases
Jul 15, 2020
700379c
Update .github/assign-by-files.yml
Jul 15, 2020
24eacc9
Update information-schema.md
Jul 15, 2020
b789106
Update information-schema/information-schema-metrics-tables.md
Jul 15, 2020
55a80c8
Update mysql-schema.md
Jul 15, 2020
a896b10
Update mysql-schema.md
Jul 15, 2020
fa17937
Merge branch 'master' into system-databases
Jul 15, 2020
974f124
Merge remote-tracking branch 'upstream/master' into system-databases
Jul 20, 2020
68fa01d
Manual merge conflicts from master
Jul 20, 2020
db26cce
Merge branch 'system-databases' of github.com:nullnotnil/docs into sy…
Jul 20, 2020
1697904
Update information-schema/information-schema-collations.md
Jul 20, 2020
d57ec78
Update information-schema/information-schema-collation-character-set-…
Jul 20, 2020
af8e7f0
Merge branch 'master' into system-databases
Jul 20, 2020
26efb66
Merge branch 'master' into system-databases
yikeke Jul 21, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/assign-by-files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@
# - TomShawn
# -

# 'system-tables/**/*.md':
# - TomShawn
# -
'information-schema/**/*.md':
- TomShawn
- nullnotnil

'ticdc/**/*.md':
- WangXiangUSTC
Expand Down
58 changes: 43 additions & 15 deletions TOC.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
+ Troubleshoot
+ [TiDB Troubleshooting Map](/tidb-troubleshooting-map.md)
+ [Identify Slow Queries](/identify-slow-queries.md)
+ [SQL Diagnostics](/system-tables/system-table-sql-diagnostics.md)
+ [SQL Diagnostics](/information-schema/information-schema-sql-diagnostics.md)
+ [Identify Expensive Queries](/identify-expensive-queries.md)
+ [Statement Summary Tables](/statement-summary-tables.md)
+ [Troubleshoot Hotspot Issues](/troubleshoot-hot-spot-issues.md)
Expand Down Expand Up @@ -375,20 +375,48 @@
+ [Partitioning](/partitioned-table.md)
+ [Character Set and Collation](/character-set-and-collation.md)
+ System Tables
+ [`mysql`](/system-tables/system-table-overview.md)
+ [`information_schema`](/system-tables/system-table-information-schema.md)
+ sql-diagnosis
+ [`cluster_info`](/system-tables/system-table-cluster-info.md)
+ [`cluster_hardware`](/system-tables/system-table-cluster-hardware.md)
+ [`cluster_config`](/system-tables/system-table-cluster-config.md)
+ [`cluster_load`](/system-tables/system-table-cluster-load.md)
+ [`cluster_systeminfo`](/system-tables/system-table-cluster-systeminfo.md)
+ [`cluster_log`](/system-tables/system-table-cluster-log.md)
+ [`metrics_schema`](/system-tables/system-table-metrics-schema.md)
+ [`metrics_tables`](/system-tables/system-table-metrics-tables.md)
+ [`metrics_summary`](/system-tables/system-table-metrics-summary.md)
+ [`inspection_result`](/system-tables/system-table-inspection-result.md)
+ [`inspection_summary`](/system-tables/system-table-inspection-summary.md)
+ [`mysql`](/mysql-schema.md)
+ `INFORMATION_SCHEMA`
+ [Overview](/information-schema.md)
+ [`ANALYZE_STATUS`](/information-schema/information-schema-analyze-status.md)
+ [`CHARACTER_SETS`](/information-schema/information-schema-character-sets.md)
+ [`CLUSTER_CONFIG`](/information-schema/information-schema-cluster-config.md)
+ [`CLUSTER_HARDWARE`](/information-schema/information-schema-cluster-hardware.md)
+ [`CLUSTER_INFO`](/information-schema/information-schema-cluster-info.md)
+ [`CLUSTER_LOAD`](/information-schema/information-schema-cluster-load.md)
+ [`CLUSTER_LOG`](/information-schema/information-schema-cluster-log.md)
+ [`CLUSTER_SYSTEMINFO`](/information-schema/information-schema-cluster-systeminfo.md)
+ [`COLLATIONS`](/information-schema/information-schema-collations.md)
+ [`COLLATION_CHARACTER_SET_APPLICABILITY`](/information-schema/information-schema-collation-character-set-applicability.md)
+ [`COLUMNS`](/information-schema/information-schema-columns.md)
+ [`DDL_JOBS`](/information-schema/information-schema-ddl-jobs.md)
+ [`ENGINES`](/information-schema/information-schema-engines.md)
+ [`INSPECTION_RESULT`](/information-schema/information-schema-inspection-result.md)
+ [`INSPECTION_RULES`](/information-schema/information-schema-inspection-rules.md)
+ [`INSPECTION_SUMMARY`](/information-schema/information-schema-inspection-summary.md)
+ [`KEY_COLUMN_USAGE`](/information-schema/information-schema-key-column-usage.md)
+ [`METRICS_SUMMARY`](/information-schema/information-schema-metrics-summary.md)
+ [`METRICS_TABLES`](/information-schema/information-schema-metrics-tables.md)
+ [`PARTITIONS`](/information-schema/information-schema-partitions.md)
+ [`PROCESSLIST`](/information-schema/information-schema-processlist.md)
+ [`SCHEMATA`](/information-schema/information-schema-schemata.md)
+ [`SEQUENCES`](/information-schema/information-schema-sequences.md)
+ [`SESSION_VARIABLES`](/information-schema/information-schema-session-variables.md)
+ [`SLOW_QUERY`](/information-schema/information-schema-slow-query.md)
+ [`STATISTICS`](/information-schema/information-schema-statistics.md)
+ [`TABLES`](/information-schema/information-schema-tables.md)
+ [`TABLE_CONSTRAINTS`](/information-schema/information-schema-table-constraints.md)
+ [`TABLE_STORAGE_STATS`](/information-schema/information-schema-table-storage-stats.md)
+ [`TIDB_HOT_REGIONS`](/information-schema/information-schema-tidb-hot-regions.md)
+ [`TIDB_INDEXES`](/information-schema/information-schema-tidb-indexes.md)
+ [`TIDB_SERVERS_INFO`](/information-schema/information-schema-tidb-servers-info.md)
+ [`TIFLASH_REPLICA`](/information-schema/information-schema-tiflash-replica.md)
+ [`TIKV_REGION_PEERS`](/information-schema/information-schema-tikv-region-peers.md)
+ [`TIKV_REGION_STATUS`](/information-schema/information-schema-tikv-region-status.md)
+ [`TIKV_STORE_STATUS`](/information-schema/information-schema-tikv-store-status.md)
+ [`USER_PRIVILEGES`](/information-schema/information-schema-user-privileges.md)
+ [`VIEWS`](/information-schema/information-schema-views.md)
+ [`METRICS_SCHEMA`](/metrics-schema.md)
+ UI
+ TiDB Dashboard
+ [Overview](/dashboard/dashboard-intro.md)
Expand Down
2 changes: 1 addition & 1 deletion _index.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ Designed for the cloud, TiDB provides flexible scalability, reliability and secu

- [TiDB Troubleshooting Map](/tidb-troubleshooting-map.md)
- [Identify Slow Queries](/identify-slow-queries.md)
- [SQL Diagnostics](/system-tables/system-table-sql-diagnostics.md)
- [SQL Diagnostics](/information-schema/information-schema-sql-diagnostics.md)
- [Troubleshoot Hotspot Issues](/troubleshoot-hot-spot-issues.md)
- [Troubleshoot the TiDB Cluster](/troubleshoot-tidb-cluster.md)
- [Troubleshoot TiCDC](/ticdc/troubleshoot-ticdc.md)
Expand Down
16 changes: 8 additions & 8 deletions check-cluster-status-using-sql-statements.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,18 @@ TiDB offers some SQL statements and system tables to check the TiDB cluster stat

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

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

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

- `ADMIN SHOW DDL`: obtains the ID of TiDB with the `DDL owner` role and `IP:PORT`.
- 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).
- The feature of `SHOW ANALYZE STATUS` is the same with that of [the `ANALYZE_STATUS` table](/information-schema/information-schema-analyze-status.md).
- Specific `EXPLAIN` statements
- `EXPLAIN ANALYZE`: obtains some detailed information for execution of a SQL statement.
- `EXPLAIN FOR CONNECTION`: obtains the execution plan for the query executed last in a connection. Can be used along with `SHOW PROCESSLIST`.
Expand Down
4 changes: 2 additions & 2 deletions dashboard/dashboard-diagnostics-report.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ The fields in the table above are described as follows:

#### Cluster Topology Info

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.
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.

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

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

### Diagnostic information

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.
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.

### Load Info

Expand Down
2 changes: 1 addition & 1 deletion faq/tidb-faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@ No. Currently, TiDB only supports the distributed storage engine and the Golevel

#### Can the `Information_schema` support more real information?

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).
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).

#### What's the explanation of the TiDB Backoff type scenario?

Expand Down
4 changes: 2 additions & 2 deletions identify-slow-queries.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ TiKV Coprocessor Task fields:

## Memory mapping in slow log

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).
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).

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

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).
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).

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.

Expand Down
Loading