sub-select in IN clause results in sequential scan

Поиск
Список
Период
Сортировка
От Anj Adu
Тема sub-select in IN clause results in sequential scan
Дата
Msg-id f2fd819a0910281113k1d122905h4118f4719a24cce7@mail.gmail.com
обсуждение исходный текст
Ответы Re: sub-select in IN clause results in sequential scan  (Grzegorz Jaśkiewicz <gryzman@gmail.com>)
Список pgsql-performance
Postgres consistently does a sequential scan on the child partitions
for this query

select * from partitioned_table
where partitioned_column > current_timestamp - interval 8 days
where x in (select yy from z where colname like 'aaa%')

If I replace the query with

select * from partitioned_table
where partitioned_column > current_timestamp - interval 8 days
where x in (hardcode_value)

The results are in line with expectation (very fast and uses a Bitmap
Index Scan on the column X)

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

Предыдущее
От: "Dave Dutcher"
Дата:
Сообщение: Re: Postgresql optimisation
Следующее
От: Grzegorz Jaśkiewicz
Дата:
Сообщение: Re: sub-select in IN clause results in sequential scan