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

Bindra Bambharoliya <[email protected]> writes:
> Query is like
> Select a.id, sum(b.amount),
> Count(c.am_id) ... from fact.a join fact.b on a.id= b.id join
> Fact.vw_c on a.ida=vw_c.ida group by a.id;

Is the query plan the same for cursor execution as regular?
Compare EXPLAIN SELECT ... versus EXPLAIN DECLARE x CURSOR FOR SELECT ...

(I'm not sure that WITH HOLD would make a difference, so
maybe compare with and without that, too.)

			regards, tom lane






view thread (4+ messages)

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], [email protected]
  Subject: Re: Cursor with hold for select takes too long
  In-Reply-To: <[email protected]>

* 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