Snowflake - Performance when column size is not specified

285 views Asked by At

Currently we are using Snowflake DWH for our project. The columns defined in the tables are defined without any size specification. Not sure why it was done so, as this was done long back. Will there be any performance hit with Snowflake DWH, when the size is not specified. For ex, by default the size of VARCHAR is 16777216 and for NUMBER is (38,0). Will there be any performance hit because of leaving the size to default in Snowflake?

1

There are 1 answers

0
Marcin Zukowski On BEST ANSWER

Actually, we're just about to add more info about it to our doc, coming very soon.

In short, the length for VARCHAR and precision ("15" in DECIMAL(15,2)for DECIMAL/NUMBER only work as constraints, and have no effect on performance. Snowflake automatically will detect the range of values and optimize storage and processing for it. The scale ("2" in DECIMAL(15,2)) for NUMBER and TIMESTAMP can influence storage and performance size though.