I need to find a table size on IBM netezza sql database from Aginity workbench on win 7.
I used this
SELECT * FROM _V_TABLE
where tablename = 'my_table_name'
But, no information about table size.
I right-clicked the table name in Aginity, but, nothing came out.
Any help would be appreciated.
thanks
This can be accomplished easily with the following query: SELECT TABLE_SCHEMA AS `Database`, TABLE_NAME AS `Table`, ROUND((DATA_LENGTH + INDEX_LENGTH) / 1024 / 1024) AS `Size (MB)` FROM information_schema.
_V_TABLE : the table view contains the list of tables created in the netezza performance system. _V_RELATION_COLUMN : the relation column system catalog view contains the columns available in a table. _V_TABLE_INDEX : this system catalog contains the information about the indexes created on table.
Double-click on the table within the Object Explorer, or right-click on the table and select "View Details".
Try this query.
select used_bytes/pow(1024,3) as used_gb, *
from _v_table_storage_stat
where tablename = 'my_table_name'
In Aginity (v2.1.181.6948), right click on your database. Select 'Show Tables Size'. The new window that appears will have table names, owner, created, bytes allocated, bytes used, etc.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With