2 ms·
What makes left joins perform poorly in Snowflake?
by theplague42 5y ago
What makes left joins perform poorly in Snowflake?
- thejosh 5y agoIt has to join each part of the previous join to the next join, and if you have a lot of joins this can get out of hand. We have a lot of joins in our final fct orders from our intermediate table, and looks like this: from foo left join bar on bar.common_id = foo.common_id left join baz on baz.common_id = foo.common_id left join qux on qux.common_id = foo.common_id left join waldo on waldo.common_id = foo.common_id So waldo joins to qux, which joins to qux... I call it a "staircase join", as that's what it looks like in the SF profiler.