Re: Query going to all paritions

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: aditya desai <admad123(at)gmail(dot)com>, Pgsql Performance <pgsql-performance(at)lists(dot)postgresql(dot)org>
Subject: Re: Query going to all paritions
Date: 2021-10-01 07:53:03
Message-ID: 9b0fc158ae0701e0e3cbd03d7f022735dc4e3f24.camel@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

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

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message aditya desai 2021-10-01 08:54:11 Re: Query going to all paritions
Previous Message aditya desai 2021-10-01 07:28:00 Query going to all paritions