Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

find the table size on IBM netezza sql database from Aginity workbench on win 7

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

like image 628
user3601704 Avatar asked Nov 05 '14 21:11

user3601704


People also ask

How do I find the table size in SQL query?

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.

How do I get a list of tables in Netezza?

_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.

How can I tell when a table was created in Netezza?

Double-click on the table within the Object Explorer, or right-click on the table and select "View Details".


2 Answers

Try this query.

select used_bytes/pow(1024,3) as used_gb, *
from _v_table_storage_stat
where tablename = 'my_table_name'
like image 160
Niederee Avatar answered Sep 27 '22 21:09

Niederee


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.

like image 33
Chris Marotta Avatar answered Sep 27 '22 21:09

Chris Marotta