Re: Join for the parent table will not leverage the index scan

Поиск
Список
Период
Сортировка
От Vijaykumar Jain
Тема Re: Join for the parent table will not leverage the index scan
Дата
Msg-id CAM+6J95KoHhtSZgqO9JLnFcC4OVwaTPTyxt1EVda5u7FFhw2kA@mail.gmail.com
обсуждение исходный текст
Ответ на Join for the parent table will not leverage the index scan  (Shrikant Bhende <shrikantpostgresql@gmail.com>)
Список pgsql-admin
On Fri, 13 Aug 2021 at 17:54, Shrikant Bhende <shrikantpostgresql@gmail.com> wrote:
 

The only place an index scan is used is to filter down page_details. In my second query,
when explicitly joining single partitions an index scan is used to perform filtering, and the join as well:


can you share the results of explain via New explain | explain.depesz.com

explain analyze <query> 
set enable_seqscan TO off;
explain analyze <query>

maybe the planner seems to find seq scans faster than index scans. 
The plan used by the optimizer should help understand the decision.
Also, I assume the tables were analyzed too.

If not, please run analyze on the tables.

also what do you see with enable_partitionwise_join enabled

set enable_partitionwise_join to on;
explain analyze <query> 
set enable_seqscan TO off;
explain analyze <query>

--
Thanks,
Vijay
Mumbai, India

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

Предыдущее
От: Shrikant Bhende
Дата:
Сообщение: Join for the parent table will not leverage the index scan
Следующее
От: Shrikant Bhende
Дата:
Сообщение: Re: Join for the parent table will not leverage the index scan