Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Table Size #590

Open
simonB2020 opened this issue Dec 16, 2021 · 1 comment
Open

Table Size #590

simonB2020 opened this issue Dec 16, 2021 · 1 comment

Comments

@simonB2020
Copy link

Really confused by the table size calculation provided here.

According to docs, one takes the block size and multiplies by the columns, nodes, slices etc
I'm not seeing the same calculations in the SQL query, only a concatenated string of the components ?
Maybe I am misunderstanding your intent ?

https://aws.amazon.com/premiumsupport/knowledge-center/redshift-cluster-storage-space/
Minimum table size = block_size (1 MB) *
(number_of_user_columns + 3 system columns) * number_of_cluster_nodes *
number_of_table_segments
1MB * (3+3) * 6 *1 = 36 MB

@adedotua
Copy link
Contributor

Could you clarify is your question about the knowledge center or one of the amazon-redshift-utils scripts? If it is the latter could you point us to the specific script? If it is the former, then the calculation in the knowledge center article is correct. The example table the article is referencing has 3 user generated columns (a, b and c) and there are 3 system columns which are automatically added to any local user table created in Redshift. The number of table segments is 1 because the table does not have a sortkey. When a sortkey is added to a table, it will have two segments - sorted and unsorted. Finally, all blocks in Redshift are 1MB in size.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants