be wary of hard-to-compress data like UUIDs, hashes, and semi-structured data (JSON) as they can increase scan times.
Snowflake will replace some function calls with the equivalent implementation.
Snowflake will only perform inlining on SQL language functions.
If a UDF is guaranteed to return the same output for identical input, you should mark it as IMMUTABLE. This tells Snowflake it can cache the result of a function call, further reducing how often it gets executed.
most common optimizations you might expect to see when working with Snowflake.
When two tables are joined on a column, you have the option to annotate those columns with primary & foreign key constraints using the RELY property. Setting this property tells the optimizer to check the relationship between the tables during query planning. If the join isn’t needed, it will be removed entirely.