Search Postgresql Archives

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On Wednesday, September 8, 2021, Koen De Groote <kdg.dev@xxxxxxxxx> 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.
 

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux