mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-01-06 21:32:58 +00:00
fix: data_length, index_length, table_rows in tables (#4927)
* fix: data_length, index_length, table_rows in tables * feat: table stats only works for mito engine currently * fix: tests * fix: typo * chore: log error when region_stats fails
This commit is contained in:
@@ -32,6 +32,14 @@ SELECT SUM(region_rows), SUM(disk_size), SUM(sst_size), SUM(index_size)
|
||||
| 3 | 2145 | 0 | 0 |
|
||||
+-------------------------------------------------------+-----------------------------------------------------+----------------------------------------------------+------------------------------------------------------+
|
||||
|
||||
SELECT data_length, index_length, avg_row_length, table_rows FROM INFORMATION_SCHEMA.TABLES WHERE table_name = 'test';
|
||||
|
||||
+-------------+--------------+----------------+------------+
|
||||
| data_length | index_length | avg_row_length | table_rows |
|
||||
+-------------+--------------+----------------+------------+
|
||||
| 0 | 0 | 26 | 3 |
|
||||
+-------------+--------------+----------------+------------+
|
||||
|
||||
DROP TABLE test;
|
||||
|
||||
Affected Rows: 0
|
||||
|
||||
@@ -21,4 +21,6 @@ SELECT SUM(region_rows), SUM(disk_size), SUM(sst_size), SUM(index_size)
|
||||
FROM INFORMATION_SCHEMA.REGION_STATISTICS WHERE table_id
|
||||
IN (SELECT TABLE_ID FROM INFORMATION_SCHEMA.TABLES WHERE table_name = 'test' and table_schema = 'public');
|
||||
|
||||
SELECT data_length, index_length, avg_row_length, table_rows FROM INFORMATION_SCHEMA.TABLES WHERE table_name = 'test';
|
||||
|
||||
DROP TABLE test;
|
||||
|
||||
Reference in New Issue
Block a user