The Vertica Forum recently got a makeover! Let us know what you think by filling out this short, anonymous survey.
Please take this survey to help us learn more about how you use third party tools. Your input is greatly appreciated!
How to get column sizes for single daily partition
Hi,
System view COLUMNS gives sizes of columns for whole table.
I am trying to find size of columns for single daily partition (before daily partitions grouped into monthly or yearly by GROUP BY).
I am pretty sure I need to use low-level system views VS_* to get this info.
I look through system views definitions and I cannot figure it out.
Would you mind to post here how to get size of columns per partition per table.
A big bonus would be if I can find size of columns for a partition group (monthly or yearly), but probably it is too much to ask.
Thank you.
0
Best Answer
-
mosheg Vertica Employee Administrator
Check the table PARTITION_COLUMNS as shown here:
https://www.vertica.com/docs/12.0.x/HTML/Content/Authoring/SQLReferenceManual/SystemTables/MONITOR/PARTITION_COLUMNS.htmE.g.
SELECT NODE_NAME, PROJECTION_NAME, COLUMN_NAME, GROUPED_PARTITION_KEY, PARTITION_KEY, SUM(DISK_SPACE_BYTES) as DISK_SPACE_BYTES, SUM(ROW_COUNT) as ROW_COUNT, SUM(DELETED_ROW_COUNT) AS DELETED_ROW_COUNT FROM PARTITION_COLUMNS WHERE TABLE_NAME IN ('Your_Table_Name') GROUP BY 1,2,3,4,5 ORDER BY 1,2,3,4,5;
1
Answers
Great!
That is exactly what I need.
Column group_partition_key is great! I am not sure why it is not present in PARTITIONS table, that is definitely oversight.
Will try to use it, will let you know how it goes.