Re: Strange runtime partition pruning behaviour with 11.4

Поиск
Список
Период
Сортировка
От MichaelDBA
Тема Re: Strange runtime partition pruning behaviour with 11.4
Дата
Msg-id eb26974b-c2b8-ce68-8aa0-5a300f308c02@sqlexec.com
обсуждение исходный текст
Ответ на Re: Strange runtime partition pruning behaviour with 11.4  (Thomas Kellerer <spam_eater@gmx.net>)
Список pgsql-performance
I too got the same plan (non runtime partition pruning plan) with or 
without the statistics.  So it looks like the workaround until this is 
fixed is to re-arrange the query to do a subselect to force the runtime 
partition pruning as Andreas suggested, which I tested and indeed does 
work for me too!

Regards,
Michael Vitale

Thomas Kellerer wrote on 8/3/2019 10:06 AM:
>> it's posible to rewrite the query to:
>>
>>
>> test=# explain analyse select count(*) from foo_bar_baz as fbb where 
>> foo_id = (select foo_id from foo where foo_name = 'eeny');
>>
>> I know, that's not a solution, but a workaround. :-(
>
> Yes, I discovered that as well.
>
> But I'm more confused (or concerned) by the fact that the (original) 
> query works correctly *without* statistics.
>
> Thomas
>
>
>
>
>




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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Strange runtime partition pruning behaviour with 11.4
Следующее
От: Thomas Kellerer
Дата:
Сообщение: Re: Strange runtime partition pruning behaviour with 11.4