INNER JOIN vs LEFT JOIN performance in SQL Server

后端 未结 9 1880
名媛妹妹
名媛妹妹 2020-11-22 11:51

I\'ve created SQL command that uses INNER JOIN on 9 tables, anyway this command takes a very long time (more than five minutes). So my folk suggested me to change INNER JOIN

9条回答
  •  故里飘歌
    2020-11-22 12:23

    Your performance problems are more likely to be because of the number of joins you are doing and whether the columns you are joining on have indexes or not.

    Worst case you could easily be doing 9 whole table scans for each join.

提交回复
热议问题