The query is slow because the only index it can use, orders_created_at_idx on created_at, does not filter on the WHERE clauses (customer_id = 48213 and status = 'pending'); instead, PostgreSQL scans the index backward and then removes over a million rows using the filter, as…





Comments
00 commentsShare your experience with this Ree or leave a suggestion for its creator.
Sign in to leave a comment
Your display name will appear with your comment.
No comments yet
Be the first to share your experience.