Re: Query going to all paritions

Поиск
Список
Период
Сортировка
От aditya desai
Тема Re: Query going to all paritions
Дата
Msg-id CAN0SRDF3vkvOj6i8pApOWMj3EE=EgcmBdX8vXPkOQ4ZgSoynqw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Query going to all paritions  (Laurenz Albe <laurenz.albe@cybertec.at>)
Ответы Re: Query going to all paritions  (hubert depesz lubaczewski <depesz@depesz.com>)
Список pgsql-performance
Hi Laurenz,
Please find attached explain query plan and query.

Regards,
Aditya.

On Friday, October 1, 2021, Laurenz Albe <laurenz.albe@cybertec.at> wrote:
On Fri, 2021-10-01 at 12:58 +0530, aditya desai wrote:
> Hi,
> Query on  one of our partitioned tables which is range partitioned on "run"date" column is going to all partitions despite having run_date in WHERE clause. "enable_parition_pruning" is also on. I am
> unable to generate a query plan as the query never runs fully even waiting for say half an hour.
>
> We have composite indexes on run_date,status. Do I need to create an index on run_date only?

You need to share the query and probably the table definition.  EXPLAIN output
(without ANALYZE) will also help.

Yours,
Laurenz Albe
--
Cybertec | https://www.cybertec-postgresql.com

Вложения

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

Предыдущее
От: Laurenz Albe
Дата:
Сообщение: Re: Query going to all paritions
Следующее
От: hubert depesz lubaczewski
Дата:
Сообщение: Re: Query going to all paritions