在MySQL里,可以通过:
SELECT
table_schema,
table_name,
CONCAT(ROUND((data_length + index_length) / 1024 / 1024 / 1024, 2), ’ GB’) AS table_size
FROM
information_schema.tables
WHERE
table_schema = ‘XXX’;
那么在oceanbase里如何查看?
在MySQL里,可以通过:
SELECT
table_schema,
table_name,
CONCAT(ROUND((data_length + index_length) / 1024 / 1024 / 1024, 2), ’ GB’) AS table_size
FROM
information_schema.tables
WHERE
table_schema = ‘XXX’;
那么在oceanbase里如何查看?
ob多少版本的呢。
是最新版4.3
OceanBase 集群环境中,磁盘空间统计很不准确,如何准确查取表占用磁盘空间大小? 可以看下这个帖子
或者 information_schema.TABLES参数 OceanBase分布式数据库-海量数据 笔笔算数
information_schema.TABLES参数里面的DATA_LENGTH参数
select TABLE_SCHEMA,TABLE_NAME,DATA_FREE from information_schema.TABLES where table_schema = ‘test’ \G
不好意思 看错了。是data_free参数
多谢您。