Performance of SQL “EXISTS” usage variants

后端 未结 9 740
-上瘾入骨i
-上瘾入骨i 2020-12-05 04:39

Is there any difference in the performance of the following three SQL statements?

SELECT * FROM tableA WHERE EXISTS (SELECT * FROM tableB WHERE tableA.x = ta         


        
9条回答
  •  青春惊慌失措
    2020-12-05 05:39

    #3 Should be the best one, as you don´t need the returned data anyway. Bringing the fields will only add an extra overhead

提交回复
热议问题