Re: The planner chooses seqscan+sort when there is an

From: Scott Marlowe <smarlowe(at)g2switchworks(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Csaba Nagy <nagy(at)ecircle-ag(dot)com>, "John D(dot) Burger" <john(at)mitre(dot)org>, Postgres general mailing list <pgsql-general(at)postgresql(dot)org>
Subject: Re: The planner chooses seqscan+sort when there is an
Date: 2006-05-03 18:36:36
Message-ID: 1146681396.22037.42.camel@state.g2switchworks.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, 2006-05-03 at 13:34, Tom Lane wrote:
> Csaba Nagy <nagy(at)ecircle-ag(dot)com> writes:
> > OK, maybe that's the point... the "cost bust" given to the sequential
> > scan by enable_seqscan=off is not enough in this case to exceed the cost
> > of the index scan ?
>
> Looks that way to me. You could try setting enable_sort off as well,
> which will penalize the seqscan+sort plan another 100million cost units.
> And maybe try reducing random_page_cost to make the indexscan look
> cheaper. However, if there's a 100million delta between the two plans,
> I suspect you really really don't want the indexscan anyway ;-)

I imagine the followup post:

So, I've had this query running for six weeks now, and...

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Geoffrey 2006-05-03 18:44:03 How does an application recognize the death of the postmaster
Previous Message Tom Lane 2006-05-03 18:34:08 Re: The planner chooses seqscan+sort when there is an