Vertica的这些事(九)——-vertica存储统计信息

vertica存储统计信息:

表数量:

1
select count(distinct table_name)  FROM tables;

分区表数量:

1
select count(distinct table_name) from PARTITION_COLUMNS;

总表占大小:

1
SELECT sum(used_bytes)/1024/1024/1024 FROM projection_storage ;

分区表总大小:

1
2
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):

1
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):

1
select partition_key,sum(disk_space_bytes)/1024/1024/1024 size from PARTITION_COLUMNS group by partition_key order by size desc limit 20;
-------------���Ľ�����л�����Ķ�-------------
qinchaofeng wechat
坚持原创技术分享,您的支持将鼓励我继续创作!