TABLE SIZE

Moderator: NorbertKrupa

Post Reply
verticadba
Newbie
Newbie
Posts: 8
Joined: Fri Nov 15, 2013 5:47 pm

TABLE SIZE

Post by verticadba » Tue Jan 14, 2014 3:25 pm

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

NorbertKrupa
GURU
GURU
Posts: 527
Joined: Tue Oct 22, 2013 9:36 pm
Location: Chicago, IL
Contact:

Re: TABLE SIZE

Post by NorbertKrupa » Tue Jan 14, 2014 10:26 pm

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.
Checkout vertica.tips for more Vertica resources.

User avatar
JimKnicely
Site Admin
Site Admin
Posts: 1825
Joined: Sat Jan 21, 2012 4:58 am
Contact:

Re: TABLE SIZE

Post by JimKnicely » Thu Jan 16, 2014 1:31 pm

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
Jim Knicely

Image

Note: I work for Vertica. My views, opinions, and thoughts expressed here do not represent those of my employer.

Post Reply

Return to “New to Vertica Database Administration”