3 ms·
That one is annoying. IN tends to be implemented as a loop. I've spend many queries up by putting an IN into a temporary table, then joining it. I have actua
by btilly 6y ago
That one is annoying. IN tends to be implemented as a loop. I've spend many queries up by putting an IN into a temporary table, then joining it.
I have actually seen it be a win to combine it like this:
SELECT ...
FROM foo
JOIN (
select 'a' as value
union all
select 'b' as value
...
) bar