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

From Csaba Nagy
Subject Re: The planner chooses seqscan+sort when there is an
Date
Msg-id 1146672070.14093.180.camel@coppola.muc.ecircle.de
Whole thread Raw
In response to Re: The planner chooses seqscan+sort when there is an index on the sort column  (Andreas Kretschmer <akretschmer@spamfence.net>)
Responses Re: The planner chooses seqscan+sort when there is an  ("John D. Burger" <john@mitre.org>)
List pgsql-general
> Without a WHERE you get the whole table.
>
> A Index-Scan is, in this case, expensive.

I know that, and I would agree if I wouldn't have asked for _ordered_
result, and wouldn't have turned enable_seqscan=off.

In these conditions I would have expected an index scan, even if it is
more expensive than the sequential scan + sort. Actually I wanted to see
how expensive it thinks it is, but I can't get to that plan at all.

Thanks,
Csaba.



pgsql-general by date:

Previous
From: Csaba Nagy
Date:
Subject: Re: The planner chooses seqscan+sort when there is an
Next
From: "Magnus Hagander"
Date:
Subject: Re: logfiles filling up