advertisement
Login | Register   
  Include Code  Search Tips
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Partners & Affiliates
advertisement
advertisement
Tip of the Day
Average Rating: 2/5 | Rate this item | 1 user has rated this item.
Expertise: Intermediate
Language: SQL
July 25, 2005
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
If you have a hot tip and we publish it, we'll pay you. However, due to accounting overhead we no longer pay $10 for a single tip submission. You must accumulate 10 acceptable tips to receive payment. Be sure to include a clear explanation of what the technique does and why it's useful. If it includes code, limit it to 20 lines if possible. Submit your tip here.
Please rate this item (5=best)
 1  2  3  4  5
advertisement
advertisement