Simple query refactor - 100x faster

133 · 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.