Re: index scan forward vs backward = speed difference of 357X slower!

Поиск
Список
Период
Сортировка
От Kevin Grittner
Тема Re: index scan forward vs backward = speed difference of 357X slower!
Дата
Msg-id 4F32B3B20200002500045085@gw.wicourts.gov
обсуждение исходный текст
Ответ на Re: index scan forward vs backward = speed difference of 357X slower!  (Kevin Traster <ktraster@freshgrillfoods.com>)
Список pgsql-performance
Kevin Traster <ktraster@freshgrillfoods.com> wrote:

> I have indexes also on activity and mfiled (both btree) - wouldn't
> the database use them? - Kevin

It will use them if they are part of the plan which had the lowest
cost when it compared the costs of all possible plans.

You haven't really shown us the schema, so there's more guesswork
involved in trying to help you than there could be.  This page might
be worth reviewing:

http://wiki.postgresql.org/wiki/SlowQueryQuestions

In particular, if there are indexes that aren't being used which you
think should be, there is a good chance that either there is a type
mismatch or your costing factors may need adjustment.

-Kevin

В списке pgsql-performance по дате отправления:

Предыдущее
От: Kevin Traster
Дата:
Сообщение: Re: index scan forward vs backward = speed difference of 357X slower!
Следующее
От: Josh Berkus
Дата:
Сообщение: Re: random_page_cost = 2.0 on Heroku Postgres