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