Skip to main content

database size

  • March 8, 2014
  • 5 replies
  • 21 views

Nicola_Cambara
Forum|alt.badge.img+1
Hello guys!
I have a problem, I must know the database size, how I can do it?

5 replies

Forum|alt.badge.img+2
  • Participating Frequently
  • March 8, 2014
If you are looking for the raw size in the context of license usage in the Admin Guide there's a page entitled "Monitoring Database Size for License Compliance" and on that page it shows how to use a get_compliance_status.

If you are talking real physical size in byes on disk you can use the projection_storage and column_storage system tables. Those are all covered in the SQL Reference Guide under the Vertica System Tables section.

I hope it helps.

Nicola_Cambara
Forum|alt.badge.img+1
  • Author
  • Participating Frequently
  • March 8, 2014
I didn't understand or with projection_storage and column_storage I have to use these commands for each table?
If so, there isn't a way to know the total physical size of the database?

Forum|alt.badge.img+2
  • Participating Frequently
  • March 8, 2014
Hi,

You can get total or drill down to some level of granularity. Below is an example of the projection_storage and getting total size or total per node.

ndw=> select sum(used_bytes) from projection_storage;
   sum
---------
 4087139
(1 row)

ndw=> select node_name,sum(used_bytes) from projection_storage group by node_name;
   node_name    |   sum
----------------+---------
 v_ndw_node0001 | 1373835
 v_ndw_node0002 | 1354463
 v_ndw_node0003 | 1358841
(3 rows)

And here's a look at the compliance raw data size for the same db, noting that above I have 4MB actual size (after compression) and below I have 10MB raw size (before compression).

ndw=> select get_compliance_status();
get_compliance_status        
------------------------------
 Raw Data Size: 0.01GB +/- 0.00GB
 License Size : 500.00GB
 Utilization  : 0%
 Audit Time   : 2014-03-07 12:13:09.864402-05

Nicola_Cambara
Forum|alt.badge.img+1
  • Author
  • Participating Frequently
  • March 8, 2014
thanks a lot :)

Harshad
Forum|alt.badge.img
  • Participating Frequently
  • March 8, 2014
Hi Nicola,

In addition to what Steve mentioned, you can also take a look at the AUDIT function which estimates the raw data size of a database, a schema, a projection, or a table as it is counted in an audit of the database size. More info on this function can be found here:

https://my.vertica.com/docs/7.0.x/HTML/index.htm#Authoring/SQLReferenceManual/Functions/VerticaFunctions/LicenseManagement/AUDIT.htm

Regards,
Harshad