In the following example, every query clause has the same result, so what is the difference between the two clauses of the query in terms of speed in returning data from database?
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (5)
Title mispelled + content seems to be missing. Was this supposed to be posted?
The post has been modified
Ah, yup. BTW join is mispelled in the title.
The first thing is, the first query is a single query, the second is actually two. Having a nested query requires the inside query being executed and then the query being executed on that data. Depending on how those perform it's pretty standard to see slower performance running two queries instead of one, and in a situation like this where things are being executed in memory this could become substantial.
There are other differences, but that's the first and most notable one.
This means that the first query will be faster with big databases!
Yup.