Cursor with hold for select takes too long

From: Bindra Bambharoliya <bindra(dot)bambharoliya(at)gmail(dot)com>
To: pgsql-sql(at)lists(dot)postgresql(dot)org
Subject: Cursor with hold for select takes too long
Date: 2024-03-22 16:50:04
Message-ID: CAPLVUMDKVU7YmZwUYM=oeXypj-r42++LCqW8aaWXnwPqpSmt6g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hi team,
I am facing issues with cursor with hold for select.

If I execute select quaery without cursor it takes 13 seconds,
If execute it like
Begin;
Cursor "sql1" with hold for select.... ;fetch 100 to "sql1"
It takes more than 3 minutes.
Even sometimes it takes more than 10 minutes.

What could be the problem?
Request to help on this ASAP.
I am facing this issue on production.
I checked locks etc. But nothing like that.

Thanks & Regards
Bindra

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Erik Brandsberg 2024-03-22 17:39:39 Re: Cursor with hold for select takes too long
Previous Message David G. Johnston 2024-03-22 13:35:22 Re: UPDATE with AND clarification