Re: How does postgres behave if several indexes have (nearly) identical conditions?

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: How does postgres behave if several indexes have (nearly) identical conditions?
Дата
Msg-id CAKFQuwYHXNpySLfhqnd2hymximAFxTT1ad9vod9Lh4FG2rTNgw@mail.gmail.com
обсуждение исходный текст
Ответ на How does postgres behave if several indexes have (nearly) identical conditions?  (Koen De Groote <kdg.dev@gmail.com>)
Список pgsql-general


On Wednesday, September 8, 2021, Koen De Groote <kdg.dev@gmail.com> wrote:


create index index_001 on my_table using btree (a001,a002,a003) where a001=true and a002=false;

create index index_002 on my_table using btree (a003) where a001=true and a002=false;

Now take this query:

select * from my_table where a001=true;

Which index will postgres pick? I'm wondering how postgres goes about picking an index to consider.

Neither…since neither partial index condition is present in the where clause of the query.

David J.
 

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

Предыдущее
От: Koen De Groote
Дата:
Сообщение: Re: How does postgres behave if several indexes have (nearly) identical conditions?
Следующее
От: Celia McInnis
Дата:
Сообщение: spiexceptions.UndefinedFile: could not open file "base/16482/681830": No such file or directory