6 ms·
> Based on our results, we find that PostgreSQL consistently exhibits equivalent or better performance for queries with an IN clause than OR clauses when filter
by enonimal 3y ago
> Based on our results, we find that PostgreSQL consistently exhibits equivalent or better performance for queries with an IN clause than OR clauses when filtering on a single attribute. This is especially true for queries with a large number of predicates. For small condition sizes (e.g., less than 10), the performance difference between the two query types is negligible.
TL;DR
- beebmam 3y agoShouldn't a database backend be able to semantically determine the two queries are equivalent and perform the same operation?