Kannan Ramamoorthy
Kannan Ramamoorthy

Reputation: 4180

Snowflake - Performance when column size is not specified

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?

Upvotes: 3

Views: 314

Answers (1)

Marcin Zukowski
Marcin Zukowski

Reputation: 4729

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.

Upvotes: 2

Related Questions