Re: Performance Issue with Hash Partition Query Execution in PostgreSQL 16

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: Ramakrishna m <ram(dot)pgdb(at)gmail(dot)com>, pgsql-general(at)lists(dot)postgresql(dot)org
Cc: ravisql09(at)gmail(dot)com
Subject: Re: Performance Issue with Hash Partition Query Execution in PostgreSQL 16
Date: 2024-11-06 18:23:11
Message-ID: c9087811007d427467ec3725180cccd153f65bd7.camel@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, 2024-11-06 at 22:43 +0530, Ramakrishna m wrote:
> One of the queries, which retrieves a single record from a table with 16 hash partitions,
> is taking more than 10 seconds to execute. In contrast, when we run the same query manually,
> it completes within milliseconds.

If I read your file right, the slow execution has an additional "LIMIT 55".
That can make a difference.

In general, you can use auto_explain to get the execution plan of the slow query.

Yours,
Laurenz Albe

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Craig McIlwee 2024-11-06 18:47:47 Trouble using pg_rewind to undo standby promotion
Previous Message Ramakrishna m 2024-11-06 17:13:46 Performance Issue with Hash Partition Query Execution in PostgreSQL 16