create table test( a int, b int, c int );
insert into test
select random()*100, random()*10, random()*5 FROM generate_series(1,1000000);
create index "full" on test( a, c );
create index "partial" on test( a, c ) where ( a in ( 3,4,5,6,7,8,9,10 ) and b in ( 2,3 ) );
analyse test;
explain analyse select * from test where a in ( 3,4,5,6,7,8,9,10 ) and b in ( 2,3 );
explain analyse select * from test where a in ( 3,4,5,6,7,8,10,9 ) and b in ( 2,3 );
do i have wrong expections from theryplanner, that those are in fact two different paths to take? currently i work around this issue by sorting the elements for the in statements, but i think that must be the wrong path.
with kind regards, richard