Re: Index ot being used - Mailing list pgsql-performance

From Bruno Wolff III
Subject Re: Index ot being used
Date
Msg-id 20050613165355.GB12557@wolff.to
Whole thread Raw
In response to Index ot being used  (linux@alteeve.com)
List pgsql-performance
On Mon, Jun 13, 2005 at 11:46:46 -0500,
  Kevin Grittner <Kevin.Grittner@wicourts.gov> wrote:
> I agree that ignoring useless columns in an ORDER BY clause is less
> important than ignoring index columns where the value is fixed.  There
> is one use case for ignoring useless ORDER BY columns that leaps to
> mind, however -- a column is added to the ORDER BY clause of a query to
> help out the optimizer, then the indexes are modified such that that
> column is no longer useful.  Whether this merits the programming effort
> and performance hit you describe seems highly questionable, though.

I suspect that this isn't a big deal. There was a question like that
that has been going back and forth over the last couple of days.

If you remove the constant expression from the index, you aren't likely
going to use the index anyway, but will instead sort the output rows
from either a sequential scan or an index scan based on an index
that does use the constant expression.

pgsql-performance by date:

Previous
From: Bruno Wolff III
Date:
Subject: Re: Index ot being used
Next
From: Rod Taylor
Date:
Subject: Re: Updates on large tables are extremely slow