how to build index to improve the performance RRS feed

  • Question

  • Suppose there are two huge tables: a and b.

    How to build index to improve the performance for this query:

    select * from a join b on a.a1= b.b1

    • Changed type SSAS_user Friday, July 6, 2012 11:16 AM question
    Friday, July 6, 2012 11:05 AM


  • With a clustered index on the two column you are joining on, you might get Merge Join rather than a Hash Join for some marginal performance improvement.

    More likely you should take a step back and ask yourself why you are running this query at all, and particularly if you want SELECT *.

    Erland Sommarskog, SQL Server MVP,
    Friday, July 6, 2012 11:15 AM