Hacker News new | ask | show | jobs
by artumi-richard 3300 days ago
I would have thought a single multi-column index would have been more appropriate. Did you consider these? They have been in PostgreSQL since 9.2

https://www.postgresql.org/docs/9.2/static/indexes-multicolu...

1 comments

A single multi-column index would only work for the one specific query in the example. We have many queries that contain filters that are not easy to index such as regular expression filters. Additionally, a multi-column index would be significantly larger than the corresponding partial index.