Browse DevX
Sign up for e-mail newsletters from DevX

Tip of the Day
Language: SQL
Expertise: Intermediate
Jul 25, 2005



Building the Right Environment to Support AI, Machine Learning and Deep Learning

Identify Columns for Indexing for Faster Queries

Between two tables of similar size, a merge join is the best possible join an optimizer can choose. If you have clustered indexes on the join columns, the optimizer will select merge join.

However, if one of the tables in the join is smaller than the other, the optimizer will choose the nested-loop join. To enable a merge join, make sure the larger input has a clustered index on the join column.

Sachin Awasthi
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date