Refcursor
Started by Yambuabout 5 years ago2 messagesgeneral
Hi
I new to cursors
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
Re: Refcursor
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