Re: BUG #15984: order of where in() query affects query planer

Поиск
Список
Период
Сортировка
От easteregg@verfriemelt.org
Тема Re: BUG #15984: order of where in() query affects query planer
Дата
Msg-id 20190902092807.0e0770b0@mail.verfriemelt.org
обсуждение исходный текст
Ответ на Re: BUG #15984: order of where in() query affects query planer  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
i have created another example for you, were i get consistent results after the analyse with the different plans:

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

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #15987: Improve REINDEX of all indexes of a table at once
Следующее
От: PG Bug reporting form
Дата:
Сообщение: BUG #15989: Cluster unable to open as hot standby after SIGKILL during exclusive backup