Snowflake Vs MS-SQL - Part 122 - Enforces the join order of the tables - Directed


Enforces the join order of the tables - Directed

If your query contains joins and you need to enforce a specific join order between tables.

MS-SQL Server

You can achieve this by using built-in Query Hints like OPTION (FORCE ORDER) as below:



In Snowflake, we can make use of the DIRECTED keyword as follows:



By default, Snowflake scans the left table first. To choose which table to scan, use the FIRST clause as above.

For more details, refer to the Directed_Join section.


Yogesh Shinde

Comments

Popular posts from this blog

Snowflake Vs MS-SQL - Series

Snowflake Key Concepts

Snowflake Vs MS-SQL - Part 46 - RATIO_TO_REPORT