Hacker News new | ask | show | jobs
by enonimal 1020 days 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

1 comments

Shouldn't a database backend be able to semantically determine the two queries are equivalent and perform the same operation?