vertica存储统计信息

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;

<script type="text/javascript"> $(function () { $('pre.prettyprint code').each(function () { var lines = $(this).text().split('\n').length; var $numbering = $('<ul/>').addClass('pre-numbering').hide(); $(this).addClass('has-numbering').parent().append($numbering); for (i = 1; i <= lines; i++) { $numbering.append($('<li/>').text(i)); }; $numbering.fadeIn(1700); }); }); </script>

猜你喜欢

转载自windyqin.iteye.com/blog/2331759