Please take this survey to help us learn more about how you use third party tools. Your input is greatly appreciated!

Raw Data Size x License Size

joliveirajoliveira
edited July 7 in General Discussion

Hi all,

I will perform a cleaning in my database, where old data will be deleted in
several tables and different schemas, I searched the documentation and I didn't find a way to calculate the volume (GB) that this action will free up space in the database.

I emphasize that I do not want the volumetry view by table or schema, but at the line level.

Thanks in advance for the support.

C/c.: @Jim_Knicely

Tagged:

Answers

  • moshegmosheg Administrator

    The AUDIT function returns the raw data size (in bytes) of a database, schema, or table as it is counted in an audit of the database size.
    Unless you specify zero error tolerance and 100 percent confidence level, AUDIT returns only approximate results that can vary over multiple iterations.
    For example: SELECT AUDIT('');

    If you want to estimate the raw data size of a given query or a table to clean data,
    The following will measure the size of 10% raw data export (with no need to create a file):

    vsql -F ',' -P null="''" -AXtnq -c "select * from YourTableName_or_Query TABLESAMPLE(10) ;" | pv | dd of=/dev/null
    

    In the above example we use pv to monitor the size and progress of data through a pipe
    To install pv on RHEL/CentOS consider this..
    sudo yum makecache
    sudo yum -y install pv

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file

Can't find what you're looking for? Search the Vertica Documentation, Knowledge Base, or Blog for more information.