4 ms·
In my orginal post I used a LEFT JOIN from content_to_tags to content. ... Using NOT EXISTS was just over two times faster, and I would assume that as the table
by trezor 17y ago
In my orginal post I used a LEFT JOIN from content_to_tags to content. ... Using NOT EXISTS was just over two times faster, and I would assume that as the tables get populated with more records the difference exponential.
If using sub-selects is faster than JOINS on what I would assume is indexed data, your query-optimizer is doing something horribly, horribly wrong.
And given how everyone complains about MySQL's support for sub-selects and the performance of those, I can't even start to comprehend how bad and inefficiently it implements JOINs if sub-selects are indeed faster.
Yeah, I think I'll just stick to SQL Server for now.
- pradocchia 17y agocorrelated subqueries are faster than joins on SQL Server too.
- trezor 17y agoIs this also true when the query would involve a full table scan or clustered index scan anyway? Maybe I'm missing something crucial, but that doesn't seem to make much sense for me from a data-access perspective.