vertica存储统计信息:
表数量:
select count(distinct table_name) FROM tables;
分区表数量:
select count(distinct table_name) from PARTITION_COLUMNS;
总表占大小:
SELECT sum(used_bytes)/1024/1024/1024 FROM projection_storage ;
分区表总大小:
select sum(disk_space_bytes)/1024/1024/1024 from PARTITION_COLUMNS;
SELECT sum(used_bytes)/1024/1024/1024 FROM projection_storage where anchor_table_name in (select distinct table_name from PARTITION_COLUMNS);
分区表大小(前10):
select table_name,sum(disk_space_bytes)/1024/1024/1024 size from PARTITION_COLUMNS group by table_name order by size desc limit 10;
分区表每个分区的大小(前20):
select partition_key,sum(disk_space_bytes)/1024/1024/1024 size from PARTITION_COLUMNS group by partition_key order by size desc limit 20;