Please find attached explain query plan and query.
Regards,
Aditya.
On Friday, October 1, 2021, Laurenz Albe <laurenz.albe@xxxxxxxxxxx> wrote:
On Friday, October 1, 2021, Laurenz Albe <laurenz.albe@xxxxxxxxxxx> 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
Attachment:
006C4247-C0E1-4329-878C-8A078B022D09.jpeg
Description: JPEG image
Attachment:
8CDD8AB8-3B86-425D-A6FA-DB5A4A305633.jpeg
Description: JPEG image
Attachment:
EDDE7EF8-214E-4D96-80B9-2198CBD17BFF.jpeg
Description: JPEG image
Attachment:
431E4725-F717-4F68-B57B-9C547B3EB898.jpeg
Description: JPEG image
Attachment:
1322075B-3D99-4FC6-810E-A067804314CB.jpeg
Description: JPEG image
Attachment:
26945355-934B-4A89-880A-22D0FF44CEA9.jpeg
Description: JPEG image