public inbox for [email protected]  
help / color / mirror / Atom feed
From: Erik Brandsberg <[email protected]>
To: Bindra Bambharoliya <[email protected]>
Cc: [email protected]
Subject: Re: Cursor with hold for select takes too long
Date: Fri, 22 Mar 2024 13:39:39 -0400
Message-ID: <CAFcck8HEJa8-53SNWxMd_8D732skiihM4S7YEsEW63swywFosg@mail.gmail.com> (raw)
In-Reply-To: <CAPLVUMDKVU7YmZwUYM=oeXypj-r42++LCqW8aaWXnwPqpSmt6g@mail.gmail.com>
References: <CAPLVUMDKVU7YmZwUYM=oeXypj-r42++LCqW8aaWXnwPqpSmt6g@mail.gmail.com>

What is the actual query being done, and how many rows are being returned?
Depending on the query, it could change the execution path, so this is
critical to understand.  If you are doing an order by on a large
result-set, it may be doing a huge amount of processing to get your first
100 rows.

On Fri, Mar 22, 2024 at 12:50 PM Bindra Bambharoliya <
[email protected]> wrote:

> 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
>


view thread (4+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: Cursor with hold for select takes too long
  In-Reply-To: <CAFcck8HEJa8-53SNWxMd_8D732skiihM4S7YEsEW63swywFosg@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox