Re: Index ot being used

Поиск
Список
Период
Сортировка
От Bruno Wolff III
Тема Re: Index ot being used
Дата
Msg-id 20050613165355.GB12557@wolff.to
обсуждение исходный текст
Ответ на Index ot being used  (linux@alteeve.com)
Список 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 по дате отправления:

Предыдущее
От: Bruno Wolff III
Дата:
Сообщение: Re: Index ot being used
Следующее
От: Rod Taylor
Дата:
Сообщение: Re: Updates on large tables are extremely slow