Re:Making a Postgres query 1k times faster
by zeroimpl on Thursday May 16, 2024 @12:24AM
(#40375184)
While OR can be performance killers, in other cases it works perfectly fine, or sometimes even better than the equivalent UNION ALL query. In this case the problem is that they are applying a LIMIT with ORDER BY so it can’t do the usual BitmapOr optimization and thus the index ends up being used purely for sorting purposes.
[ Parent
| on HN ]
There are no comments on this comment yet.