How to calculate the table size, which is right
select audit('table_name','table');
select object_schema,object_name,size_bytes/power(1024,3) "Size(GB)" from user_audits where object_schema='object_schema'; is shows the size of the table as 21gb
select sum(used_bytes) as used_bytes, sum(ros_used_bytes) as ros_used_bytes from column_storage where anchor_table_name = 'table_name' and anchor_table_schema = 'schema_name'; this shows the size as 4gb
Thanks
Vertica DBA
TABLE SIZE
Moderator: NorbertKrupa
-
- GURU
- Posts: 527
- Joined: Tue Oct 22, 2013 9:36 pm
- Location: Chicago, IL
- Contact:
Re: TABLE SIZE
What would happen if you left the granularity blank?
I would probably trust the audit size. To get the correct size from column_storage, you have to take into distribution of data across any nodes.
Being such a considerable size difference, I would try to use my gut feeling.
I would probably trust the audit size. To get the correct size from column_storage, you have to take into distribution of data across any nodes.
Being such a considerable size difference, I would try to use my gut feeling.
Checkout vertica.tips for more Vertica resources.
- JimKnicely
- Site Admin
- Posts: 1825
- Joined: Sat Jan 21, 2012 4:58 am
- Contact:
Re: TABLE SIZE
I believe that the audit() function returns the raw data size while the column_storage table provides the compressed data size.
Check out the post http://www.vertica-forums.com/viewtopic.php?f=63&t=1361
Check out the post http://www.vertica-forums.com/viewtopic.php?f=63&t=1361
Jim Knicely
Note: I work for Vertica. My views, opinions, and thoughts expressed here do not represent those of my employer.
Note: I work for Vertica. My views, opinions, and thoughts expressed here do not represent those of my employer.