Re: Refcursor

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: Yambu <hyambu(at)gmail(dot)com>, pgsql-general <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Refcursor
Date: 2021-03-15 13:39:44
Message-ID: 8588634ebfd4fa3b0c9a0608e19c30f1cf80c03a.camel@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, 2021-03-15 at 13:58 +0200, Yambu wrote:
> May I know why the below takes so long?
>
>
> BEGIN;
> select * from func1() ;
> fetch all from "<unnamed portal 1>";
> end;
>
> Select * from func1() ; on its own is very fast

The second just fetches a cursor for the query, the
first executes the query. Executing the query is what
can take long.

Yours,
Laurenz Albe
--
Cybertec | https://www.cybertec-postgresql.com

In response to

  • Refcursor at 2021-03-15 11:58:50 from Yambu

Browse pgsql-general by date

  From Date Subject
Next Message Laurenz Albe 2021-03-15 13:44:07 Re: Need help on understanding of wal_keep-segments and max_wal_size dependency.
Previous Message Yambu 2021-03-15 11:58:50 Refcursor