Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to measure table space on disk in RedShift / ParAccel

Tags:

I have a table in RedShift. How can I see how many disk-space it uses?

like image 607
diemacht Avatar asked Oct 22 '13 05:10

diemacht


People also ask

How do I check disk space in Redshift?

Check the percentage of disk space under the Performance tab in the Amazon Redshift console. For each cluster node, Amazon Redshift provides extra disk space, which is larger than the nominal disk capacity.

What is addressable storage capacity in Redshift?

A single Redshift cluster for each size can address up to 16 PB, 8 PB, and 1 PB of data with 128 nodes of RA3.

What is the storage for Redshift?

Typical database block sizes range from 2 KB to 32 KB. Amazon Redshift uses a block size of 1 MB, which is more efficient and further reduces the number of I/O requests needed to perform any database loading or other operations that are part of query execution.

Does Redshift separate compute storage?

Amazon Redshift managed storage is available with serverless and RA3 node types and lets you scale and pay for compute and storage independently so you can size your cluster based only on your compute needs.


1 Answers

Use queries from this presentation: http://www.slideshare.net/AmazonWebServices/amazon-redshift-best-practices

Analyze disk space usage for cluster:

select     trim(pgdb.datname) as Database,     trim(pgn.nspname) as Schema,     trim(a.name) as Table,     b.mbytes,     a.rows from (     select db_id, id, name, sum(rows) as rows     from stv_tbl_perm a     group by db_id, id, name ) as a join pg_class as pgc on pgc.oid = a.id join pg_namespace as pgn on pgn.oid = pgc.relnamespace join pg_database as pgdb on pgdb.oid = a.db_id join (     select tbl, count(*) as mbytes     from stv_blocklist     group by tbl ) b on a.id = b.tbl order by mbytes desc, a.db_id, a.name;  

Analyze Table distribution between nodes:

select slice, col, num_values, minvalue, maxvalue from svv_diskusage where name = '__INSERT__TABLE__NAME__HERE__' and col = 0 order by slice, col; 
like image 189
Tomasz Tybulewicz Avatar answered Oct 02 '22 20:10

Tomasz Tybulewicz