Re: Index problem

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: rigmor(dot)ukuhe(at)finestmedia(dot)com
Cc: "Matt Clark" <matt(at)ymogen(dot)net>, pgsql-performance(at)postgresql(dot)org
Subject: Re: Index problem
Date: 2003-09-25 13:38:27
Message-ID: 2395.1064497107@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

"Rigmor Ukuhe" <rigmor(dot)ukuhe(at)finestmedia(dot)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

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2003-09-25 13:55:26 Re: performance hit when joining with a view?
Previous Message Palle Girgensohn 2003-09-25 12:36:53 performance hit when joining with a view?