I have a problem where a query gets _much_ slower if I add statements
to the where clause than if I just get everything and filter in the
code. I expected the query to be faster as the where clause gets
bigger (and thus the data to return gets lower).
I've put inline the SQL and explain
On Tue, 29 Jun 2004, James Antill wrote:
- Index Scan using idx_ticket_groups_assigned on ticket_groups g
(cost=0.00..241.76 rows=5 width=20) (actual time=0.13..12.67 rows=604 loops=1)
Index Cond: (assigned_to = 1540)
Here the planner estimated that it