Simple query refactor - 100x faster

· Heath Henley · Dec. 20, 2025, 6:40 p.m.
Summary
This blog post discusses a performance improvement technique for a slow SQL query by restructuring the WHERE clause to leverage PostgreSQL's indexing capabilities. The author demonstrates that using tuples in the filter condition significantly enhances execution speed on the same dataset, illustrating the practical benefits of query optimization in database management.
AUTHOR
Sponsored
Zulip logo Zulip
Organized team chat for people who take work seriously. Topic-based threading keeps conversations focused.
Try Zulip
Become a sponsor →