Skip to content

Commit f9fc86a

Browse files
authored
Merge pull request #7736 from soyeric128/index-size
docs: index size
2 parents 24ea516 + 235f93d commit f9fc86a

File tree

2 files changed

+41
-33
lines changed

2 files changed

+41
-33
lines changed

docs/doc/30-reference/20-functions/111-system-functions/fuse_snapshot.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ INSERT INTO mytable VALUES(4,4);
2222
SELECT * FROM FUSE_SNAPSHOT('default','mytable');
2323

2424
---
25-
| snapshot_id | snapshot_location | format_version | previous_snapshot_id | segment_count | block_count | row_count | bytes_uncompressed | bytes_compressed | timestamp |
26-
|----------------------------------|------------------------------------------------------------|----------------|----------------------------------|---------------|-------------|-----------|--------------------|------------------|----------------------------|
27-
| dd98266f968f4817b470255592d04fda | 670655/670675/_ss/dd98266f968f4817b470255592d04fda_v1.json | 1 | \N | 1 | 1 | 2 | 16 | 290 | 2022-09-07 01:58:55.204997 |
28-
| 2f2d004ff6f842cdb25f5631b2bbb703 | 670655/670675/_ss/2f2d004ff6f842cdb25f5631b2bbb703_v1.json | 1 | dd98266f968f4817b470255592d04fda | 2 | 2 | 4 | 32 | 580 | 2022-09-07 01:59:09.742999 |
29-
| 0aa6dfd5d5364bde80f21161ba48c96e | 670655/670675/_ss/0aa6dfd5d5364bde80f21161ba48c96e_v1.json | 1 | 2f2d004ff6f842cdb25f5631b2bbb703 | 3 | 3 | 5 | 40 | 862 | 2022-09-07 01:59:16.858454 |
25+
| snapshot_id | snapshot_location | format_version | previous_snapshot_id | segment_count | block_count | row_count | bytes_uncompressed | bytes_compressed | index_size | timestamp |
26+
|----------------------------------|------------------------------------------------------------|----------------|----------------------------------|---------------|-------------|-----------|--------------------|------------------|------------|----------------------------|
27+
| a13d211b7421432898a3786848b8ced3 | 670655/783287/_ss/a13d211b7421432898a3786848b8ced3_v1.json | 1 | \N | 1 | 1 | 2 | 16 | 290 | 363 | 2022-09-19 14:51:52.860425 |
28+
| cf08e6af6c134642aeb76bc81e6e7580 | 670655/783287/_ss/cf08e6af6c134642aeb76bc81e6e7580_v1.json | 1 | a13d211b7421432898a3786848b8ced3 | 2 | 2 | 4 | 32 | 580 | 726 | 2022-09-19 14:52:15.282943 |
29+
| 1bd4f68b831a402e8c42084476461aa1 | 670655/783287/_ss/1bd4f68b831a402e8c42084476461aa1_v1.json | 1 | cf08e6af6c134642aeb76bc81e6e7580 | 3 | 3 | 5 | 40 | 862 | 1085 | 2022-09-19 14:52:20.284347 |
3030
```

docs/doc/30-reference/30-sql/40-show/show-table-status.md

Lines changed: 36 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@
22
title: SHOW TABLE STATUS
33
---
44

5-
Shows the list of table status in the currently selected database.
5+
Shows the status of the tables in a database. The status information includes various physical sizes and timestamps about a table, see [Examples](#examples) for details.
6+
7+
The command returns status information of all the tables in the current database by default. Use a FROM | IN clause to specify another database rather than the current one. You can also filter tables with a LIKE or WHERE clause.
68

79
## Syntax
810

9-
```
11+
```sql
1012
SHOW TABLE STATUS
1113
[{FROM | IN} db_name]
1214
[LIKE 'pattern' | WHERE expr]
@@ -16,17 +18,19 @@ SHOW TABLE STATUS
1618

1719
```sql
1820
CREATE TABLE t(id INT);
19-
SHOW TABLE STATUS\G
21+
22+
-- Show status of all tables in the current database
23+
SHOW TABLE STATUS;
2024
*************************** 1. row ***************************
2125
Name: t
2226
Engine: FUSE
2327
Version: 0
2428
Row_format: NULL
25-
Rows: NULL
29+
Rows: 0
2630
Avg_row_length: NULL
27-
Data_length: NULL
31+
Data_length: 0
2832
Max_data_length: NULL
29-
Index_length: NULL
33+
Index_length: 0
3034
Data_free: NULL
3135
Auto_increment: NULL
3236
Create_time: 2022-04-08 04:13:48.988 +0000
@@ -37,19 +41,20 @@ Max_data_length: NULL
3741
Comment:
3842
```
3943

40-
Showing the tables with table name `"t"`:
44+
The following returns status information of the table named "t":
45+
4146
```sql
42-
SHOW TABLE STATUS LIKE 't'\G
47+
SHOW TABLE STATUS LIKE 't';
4348
*************************** 1. row ***************************
4449
Name: t
4550
Engine: FUSE
4651
Version: 0
4752
Row_format: NULL
48-
Rows: NULL
53+
Rows: 0
4954
Avg_row_length: NULL
50-
Data_length: NULL
55+
Data_length: 0
5156
Max_data_length: NULL
52-
Index_length: NULL
57+
Index_length: 0
5358
Data_free: NULL
5459
Auto_increment: NULL
5560
Create_time: 2022-04-08 04:13:48.988 +0000
@@ -60,42 +65,44 @@ Max_data_length: NULL
6065
Comment:
6166
```
6267

63-
Showing the tables begin with `"t"`:
68+
The following uses a LIKE clause to return status information of the tables with a name starting with "t":
69+
6470
```sql
65-
SHOW TABLE STATUS LIKE 't%'\G
71+
SHOW TABLE STATUS LIKE 't%';
6672
*************************** 1. row ***************************
6773
Name: t
6874
Engine: FUSE
6975
Version: 0
7076
Row_format: NULL
71-
Rows: NULL
77+
Rows: 0
7278
Avg_row_length: NULL
73-
Data_length: NULL
79+
Data_length: 0
7480
Max_data_length: NULL
75-
Index_length: NULL
81+
Index_length: 0
7682
Data_free: NULL
7783
Auto_increment: NULL
7884
Create_time: 2022-04-08 04:13:48.988 +0000
7985
Update_time: NULL
8086
Check_time: NULL
8187
Collation: NULL
8288
Checksum: NULL
83-
Comment:
89+
Comment:
8490
```
8591

86-
Showing the tables begin with `"t"` with `WHERE`:
92+
The following uses a WHERE clause to return status information of the tables with a name starting with "t":
93+
8794
```sql
88-
SHOW TABLE STATUS WHERE name LIKE 't%'\G
95+
SHOW TABLE STATUS WHERE name LIKE 't%';
8996
*************************** 1. row ***************************
9097
Name: t
9198
Engine: FUSE
9299
Version: 0
93100
Row_format: NULL
94-
Rows: NULL
101+
Rows: 0
95102
Avg_row_length: NULL
96-
Data_length: NULL
103+
Data_length: 0
97104
Max_data_length: NULL
98-
Index_length: NULL
105+
Index_length: 0
99106
Data_free: NULL
100107
Auto_increment: NULL
101108
Create_time: 2022-04-08 04:13:48.988 +0000
@@ -106,19 +113,20 @@ Max_data_length: NULL
106113
Comment:
107114
```
108115

109-
Showing the tables are inside `"default"`:
116+
The following returns status information of all tables in the database `default`:
117+
110118
```sql
111-
SHOW TABLE STATUS FROM 'default'\G
119+
SHOW TABLE STATUS FROM 'default';
112120
*************************** 1. row ***************************
113121
Name: t
114122
Engine: FUSE
115123
Version: 0
116124
Row_format: NULL
117-
Rows: NULL
125+
Rows: 0
118126
Avg_row_length: NULL
119-
Data_length: NULL
127+
Data_length: 0
120128
Max_data_length: NULL
121-
Index_length: NULL
129+
Index_length: 0
122130
Data_free: NULL
123131
Auto_increment: NULL
124132
Create_time: 2022-04-08 04:13:48.988 +0000
@@ -127,4 +135,4 @@ Max_data_length: NULL
127135
Collation: NULL
128136
Checksum: NULL
129137
Comment:
130-
```
138+
```

0 commit comments

Comments
 (0)