Re: Index ot being used

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>
Cc: tgl(at)sss(dot)pgh(dot)pa(dot)us, linux(at)alteeve(dot)com, john(at)arbash-meinel(dot)com, tobias(at)nordicbet(dot)com, pgsql-performance(at)postgresql(dot)org
Subject: Re: Index ot being used
Date: 2005-06-13 16:53:55
Message-ID: 20050613165355.GB12557@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Mon, Jun 13, 2005 at 11:46:46 -0500,
Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)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.

Browse pgsql-performance by date

  From Date Subject
Next Message Jona 2005-06-13 17:10:32 Re: How to enhance the chance that data is in disk cache
Previous Message Rod Taylor 2005-06-13 16:53:19 Re: Updates on large tables are extremely slow