Re: Index problem - Mailing list pgsql-performance

From Tom Lane
Subject Re: Index problem
Date
Msg-id 2395.1064497107@sss.pgh.pa.us
Whole thread Raw
In response to Re: Index problem  ("Rigmor Ukuhe" <rigmor.ukuhe@finestmedia.com>)
List pgsql-performance
"Rigmor Ukuhe" <rigmor.ukuhe@finestmedia.com> writes:
>>> What causes this behaviour? is there any workaround? Suggestions?

At some point the planner is going to decide that one seqscan is cheaper
than repeated indexscans.  At some point it'll be right ... but in this
case it seems its relative cost estimates are off a bit.  You might try
reducing random_page_cost to bring them more into line with reality.
(But keep in mind that the reality you are measuring appears to be
small-table-already-fully-cached reality.  On a large table you might
find that small random_page_cost isn't such a hot idea after all.)

            regards, tom lane

pgsql-performance by date:

Previous
From: Palle Girgensohn
Date:
Subject: performance hit when joining with a view?
Next
From: Tom Lane
Date:
Subject: Re: performance hit when joining with a view?