docs: improve the system table chapter

This commit is contained in:
Xiaoyu Wang 2022-09-28 15:12:28 +08:00
parent 988faa8070
commit 7ebbce4542
2 changed files with 28 additions and 4 deletions

View File

@ -11,7 +11,15 @@ TDengine includes a built-in database named `INFORMATION_SCHEMA` to provide acce
4. Future versions of TDengine can add new columns to INFORMATION_SCHEMA tables without affecting existing business systems. 4. Future versions of TDengine can add new columns to INFORMATION_SCHEMA tables without affecting existing business systems.
5. It is easier for users coming from other database management systems. For example, Oracle users can query data dictionary tables. 5. It is easier for users coming from other database management systems. For example, Oracle users can query data dictionary tables.
Note: SHOW statements are still supported for the convenience of existing users. :::info
- SHOW statements are still supported for the convenience of existing users.
- Some columns in the system table may be keywords, and you need to use the escape character '\`' when querying, for example, the query database test has several VGROUPs:
```sql
select `vgroups` from ins_databases where name = 'test';
```
:::
This document introduces the tables of INFORMATION_SCHEMA and their structure. This document introduces the tables of INFORMATION_SCHEMA and their structure.
@ -102,7 +110,11 @@ Provides information about user-created databases. Similar to SHOW DATABASES.
| 24 | wal_retention_period | INT | WAL retention period | | 24 | wal_retention_period | INT | WAL retention period |
| 25 | wal_retention_size | INT | Maximum WAL size | | 25 | wal_retention_size | INT | Maximum WAL size |
| 26 | wal_roll_period | INT | WAL rotation period | | 26 | wal_roll_period | INT | WAL rotation period |
| 27 | wal_segment_size | WAL file size | | 27 | wal_segment_size | BIGINT | WAL file size |
| 28 | stt_trigger | SMALLINT | The number of files placed on the disk that trigger file merging |
| 29 | table_prefix | SMALLINT | The table name is used for the prefix length that needs to be ignored when calculating the consistent HASH |
| 30 | table_suffix | SMALLINT | The table name is used for the suffix length that needs to be ignored when calculating the consistent HASH |
| 31 | tsdb_pagesize | INT | Page size for vnode data storage engine, in KB |
## INS_FUNCTIONS ## INS_FUNCTIONS

View File

@ -12,7 +12,15 @@ TDengine 内置了一个名为 `INFORMATION_SCHEMA` 的数据库,提供对数
4. TDengine 在后续演进中可以灵活的添加已有 INFORMATION_SCHEMA 中表的列,而不用担心对既有业务系统造成影响 4. TDengine 在后续演进中可以灵活的添加已有 INFORMATION_SCHEMA 中表的列,而不用担心对既有业务系统造成影响
5. 与其他数据库系统更具互操作性。例如Oracle 数据库用户熟悉查询 Oracle 数据字典中的表 5. 与其他数据库系统更具互操作性。例如Oracle 数据库用户熟悉查询 Oracle 数据字典中的表
Note: 由于 SHOW 语句已经被开发者熟悉和广泛使用,所以它们仍然被保留。 :::info
- 由于 SHOW 语句已经被开发者熟悉和广泛使用,所以它们仍然被保留。
- 系统表中的一些列可能是关键字,在查询时需要使用转义符'\`',例如查询数据库 test 有几个 VGROUP
```sql
select `vgroups` from ins_databases where name = 'test';
```
:::
本章将详细介绍 `INFORMATION_SCHEMA` 这个内置元数据库中的表和表结构。 本章将详细介绍 `INFORMATION_SCHEMA` 这个内置元数据库中的表和表结构。
@ -103,7 +111,11 @@ Note: 由于 SHOW 语句已经被开发者熟悉和广泛使用,所以它们
| 24 | wal_retention_period | INT | WAL 的保存时长 | | 24 | wal_retention_period | INT | WAL 的保存时长 |
| 25 | wal_retention_size | INT | WAL 的保存上限 | | 25 | wal_retention_size | INT | WAL 的保存上限 |
| 26 | wal_roll_period | INT | wal 文件切换时长 | | 26 | wal_roll_period | INT | wal 文件切换时长 |
| 27 | wal_segment_size | wal 单个文件大小 | | 27 | wal_segment_size | BIGINT | wal 单个文件大小 |
| 28 | stt_trigger | SMALLINT | 表示落盘文件触发文件合并的个数 |
| 29 | table_prefix | SMALLINT | 表示表名用于计算一致性 HASH 时需要忽略的前缀长度 |
| 30 | table_suffix | SMALLINT | 表示表名用于计算一致性 HASH 时需要忽略的后缀长度 |
| 31 | tsdb_pagesize | INT | 一个 VNODE 中时序数据存储引擎的页大小 |
## INS_FUNCTIONS ## INS_FUNCTIONS