I have a table in RedShift. How can I see how many disk-space it uses?
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.
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.
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.
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.
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;
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