Making a Postgres query 1,000 times faster

🧵 We recently shipped a 3-4x speedup for large full-text search and filtered queries https://t.co/hBiiNCuaDx
Optimizing Further
Creating so many indices and aggregating so many tables is sub-optimal. To optimize this, we employ materialized views, which create a separate disk-based entity and hence support indexing. The only downside is that we have to keep it updated.
CREATE MATERIALIZED VIEW search_view AS
á… á… SELECT c.name FROM company c UNION
á… á… SELECT... See more
Creating so many indices and aggregating so many tables is sub-optimal. To optimize this, we employ materialized views, which create a separate disk-based entity and hence support indexing. The only downside is that we have to keep it updated.
CREATE MATERIALIZED VIEW search_view AS
á… á… SELECT c.name FROM company c UNION
á… á… SELECT... See more
