Vertica table size !!!!

Moderator: NorbertKrupa

adrian.oprea
Intermediate
Intermediate
Posts: 163
Joined: Tue Jun 19, 2012 2:44 pm
Location: Rio de Janeiro
Contact:

Vertica table size !!!!

Post by adrian.oprea » Mon Jun 25, 2012 9:21 pm

Hy all , is there a way to see a single table size in vertica ??????????

- thank you guys !!
trying so hard !!!

User avatar
Josh
Intermediate
Intermediate
Posts: 106
Joined: Thu Jan 26, 2012 9:38 pm

Re: Vertica table size !!!!

Post by Josh » Tue Jun 26, 2012 2:03 am

Hey Adrian,

I've been using the projection_storage table. You have to add up the storage for all the projections based on the table.

i.e.

Code: Select all

dbadmin=> select node_name,
dbadmin->        sum(used_bytes)
dbadmin->   from projection_storage
dbadmin->  where anchor_table_name = 'D_Department'
dbadmin->    and anchor_table_schema = 'public
dbadmin->  group
dbadmin->     by node_name;
  node_name       |  sum
------------------+-------
 v_vmain_node0001 | 67087
 v_vmain_node0002 | 67087
 v_vmain_node0003 | 67087
(3 rows)
Thank you!
Joshua

adrian.oprea
Intermediate
Intermediate
Posts: 163
Joined: Tue Jun 19, 2012 2:44 pm
Location: Rio de Janeiro
Contact:

Re: Vertica table size !!!!

Post by adrian.oprea » Tue Jun 26, 2012 10:03 pm

Thank you for the answer!!
I have no projections made on the table , i am making a benchmarking report for a future client so i need to know what vertica will bring to the table as space savings.
- but this i tink will do it !!
Thanks !!
-if thate are more ideas out there please post them !!
trying so hard !!!

id10t
GURU
GURU
Posts: 732
Joined: Mon Apr 16, 2012 2:44 pm

Re: Vertica table size !!!!

Post by id10t » Wed Jun 27, 2012 7:52 am

I have no projections made on the table
You have not, but Vertica did (see Concept Guide)! All table have at least one projection - a super projection. It's done for data integrity. Check size of super projection.
-if thate are more ideas out there please post them !!
Josh provided to you a simple and good solution (may be a best) - what you didn't like in it?
Also you can sum each column size for table.

Code: Select all

select sum( used_bytes ) from column_storage where anchor_table_name = 'aTableName';
Last edited by id10t on Wed Jun 27, 2012 2:14 pm, edited 2 times in total.

adrian.oprea
Intermediate
Intermediate
Posts: 163
Joined: Tue Jun 19, 2012 2:44 pm
Location: Rio de Janeiro
Contact:

Re: Vertica table size !!!!

Post by adrian.oprea » Wed Jun 27, 2012 1:38 pm

Josh solution was great did the job .
Thank you guys !!!
trying so hard !!!

adrian.oprea
Intermediate
Intermediate
Posts: 163
Joined: Tue Jun 19, 2012 2:44 pm
Location: Rio de Janeiro
Contact:

Re: Vertica table size !!!!

Post by adrian.oprea » Wed Jun 27, 2012 2:08 pm

Hy all ,
After taking a look at the "column_storage" table i have made my table size checking scripts :)
Take a look and tell me if this is accurate ?!!
In MB

Code: Select all

select sum(ros_used_bytes)/1024/1024  as "Table_Size in MB"from column_storage where anchor_table_name = 'table_name';
In Gb

Code: Select all

select sum(ros_used_bytes)/1024^3  as "Table_Size in Gb"from column_storage where anchor_table_name = 'table_name';
- Good to remember that this search is on a single node !! to use it on more then one node just add the " and node_name='XXXX' group by node_name;"
trying so hard !!!

id10t
GURU
GURU
Posts: 732
Joined: Mon Apr 16, 2012 2:44 pm

Re: Vertica table size !!!!

Post by id10t » Wed Jun 27, 2012 2:12 pm

Hi Adrian!
Hmmm... You count ROS containers, while you want a table size.
So answer: no - solution do not match the problem.

Post Reply

Return to “Vertica Database Administration”