From: Bruno Wolff III <bruno@wolff.to>
To: Kevin Grittner <Kevin.Grittner@wicourts.gov>
Cc: tgl@sss.pgh.pa.us
Cc: linux@alteeve.com
Cc: john@arbash-meinel.com
Cc: tobias@nordicbet.com
Cc: pgsql-performance@postgresql.org
Subject: Re: Index ot being used
Date: Mon, 13 Jun 2005 11:53:55 -0500
Message-ID: <20050613165355.GB12557@wolff.to> (raw)
In-Reply-To: <s2ad7232.066@gwmta.wicourts.gov>
References: <s2ad7232.066@gwmta.wicourts.gov>
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.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: bruno@wolff.to, Kevin.Grittner@wicourts.gov, tgl@sss.pgh.pa.us, linux@alteeve.com, john@arbash-meinel.com, tobias@nordicbet.com
Subject: Re: Index ot being used
In-Reply-To: <20050613165355.GB12557@wolff.to>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox