Re: Bad query plan decision when using multiple column index -postgresql uses only first column then filters

Поиск
Список
Период
Сортировка
От Cosmin Prund
Тема Re: Bad query plan decision when using multiple column index -postgresql uses only first column then filters
Дата
Msg-id CAGU4dz-3XsqExTCdfdzDBocT3dYX4k6ybOp6Su468nfxuXmAsQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Bad query plan decision when using multiple column index -postgresql uses only first column then filters  (Laurenz Albe <laurenz.albe@cybertec.at>)
Список pgsql-performance


On Thu, 16 Jan 2020 at 20:20, Laurenz Albe <laurenz.albe@cybertec.at> wrote:
Well, what should the poor thing do?
There is no index on "LucrareBugetDateId".

I did add an index on "LucrareBugetDateId" (before accidentally "fixing" the problem with ANALYZE) and it didn't help.
 
Rather, you have two indexes on ("LucrareBugetVersiuneId", "LucrareBugetDateId"),
one of which should be dropped.

One will be dropped. The second one was added out of desperation (because it wasn't using the first one).
 
Try with an index on "LucrareBugetDateId".

Yours,
Laurenz Albe
--
Cybertec | https://www.cybertec-postgresql.com

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Bad query plan decision when using multiple column index - postgresql uses only first column then filters
Следующее
От: Cosmin Prund
Дата:
Сообщение: Re: Bad query plan decision when using multiple column index -postgresql uses only first column then filters