Re: [PERFORM] Forcing index scan on query produces 16x faster

2010-03-24 Thread Eger, Patrick
, lack of readahead, TLB misses, etc cpu_tuple_cost = 1.0 cpu_index_tuple_cost = 0.5 cpu_operator_cost = 0.25 effective_cache_size = 1000MB shared_buffers = 1000MB -Original Message- From: Robert Haas [mailto:robertmh...@gmail.com] Sent: Wednesday, March 24, 2010 5:47 PM To: Eger, Patrick

Re: [PERFORM] PostgreSQL upgraded to 8.2 but forcing index scan on query produces faster

2010-03-22 Thread Eger, Patrick
Not to beat a dead horse excessively, but I think the below is a pretty good argument for index hints? I know the general optimizer wants to be highest priority (I very much agree with this), but I think there are fully legitimate cases like the below. Asking the user to rewrite the query in an unn

Re: [PERFORM] Forcing index scan on query produces 16x faster

2010-03-17 Thread Eger, Patrick
I'm running 8.4.2 and have noticed a similar heavy preference for sequential scans and hash joins over index scans and nested loops. Our database is can basically fit in cache 100% so this may not be applicable to your situation, but the following params seemed to help us: seq_page_cost = 1.0 ran