Re: The planner chooses seqscan+sort when there is an - Mailing list pgsql-general

From Martijn van Oosterhout
Subject Re: The planner chooses seqscan+sort when there is an
Date
Msg-id 20060503164450.GD27354@svana.org
Whole thread Raw
In response to Re: The planner chooses seqscan+sort when there is an  (Csaba Nagy <nagy@ecircle-ag.com>)
List pgsql-general
On Wed, May 03, 2006 at 06:42:00PM +0200, Csaba Nagy wrote:
> 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 ? The table is quite big, might be possible. I still
> wonder why would be seqscan+sort faster than index scan... the sort will
> for sure have to write to disk too given the size of the table...

Have you tuned the values of effective_cache_size and random_page_cost?
These have significant effects on index scans.

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

Attachment

pgsql-general by date:

Previous
From: Csaba Nagy
Date:
Subject: Re: The planner chooses seqscan+sort when there is an
Next
From: "Karen Hill"
Date:
Subject: Re: insert into a view?