Jeff Frost <[EMAIL PROTECTED]> writes: > [ umpteen million iterations of: ] > -> Limit (cost=0.00..367.09 rows=1 width=8) > -> Index Scan Backward using page_view_stamp_idx on > page_view pv2 (cost=0.00..158215.86 rows=431 width=8) > Index Cond: (stamp < $1) > Filter: ((stamp IS NOT NULL) AND (visit_id = $0))
Perhaps an index on (visit_id, stamp) would help. This one is doing the best it can, but if the visit_id's you want are thinly scattered, it'll still suck... regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly