Sub query and join query who is faster

Subqueries and join queries can achieve the same effect, that is, the same result set, but who is faster and who is slower? In general join queries, if conditions are added later, the original SQL needs to be changed. In order not to change the original SQL, I usually use sub-queries to do it. This means that the meaning is relatively clear and the original SQL is not changed, but I have a doubt in my mind, whether this will affect the performance. After some searching, I feel that the performance should be similar.

 

See the discussion in this post

http://bbs.csdn.net/topics/310125796 wrote
Subqueries are slightly faster than join queries (because of join Cartesian effect) within 100 microseconds

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326233837&siteId=291194637