Re: BUG #14107: Major query planner bug regarding subqueries and indices

Поиск
Список
Период
Сортировка
От Mathias Kunter
Тема Re: BUG #14107: Major query planner bug regarding subqueries and indices
Дата
Msg-id cf9b0435-1ddf-fd58-e899-ddfd7d518c9e@gmail.com
обсуждение исходный текст
Ответ на Re: BUG #14107: Major query planner bug regarding subqueries and indices  (David Rowley <david.rowley@2ndquadrant.com>)
Список pgsql-bugs
> How do you find the ANY(ARRAY(...)) version performs with say 10
> million records in the array?

I've tested with a subquery which returns about 20 million different
rows. In this case IN(...) is about 5 times faster than ANY(ARRAY(...))
for me. The exact numbers are:

IN(...):           about 22 seconds
ANY(ARRAY(...)):   about 115 seconds

However, estimated query costs seem to be always correct. So shouldn't
it be quite easy for the planner to create query plans for both the
ANY(ARRAY(...)) and the IN(...) version and then just use the plan where
costs are cheaper?

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #14132: ON CONFLICT not inferring unique index with bigints
Следующее
От: yjh0502@gmail.com
Дата:
Сообщение: BUG #14134: segmentation fault with large table with gist index