[GENERAL] pl-pgsql "return set of..." "return next..." performance question

2007-11-16 Thread Gauthier, Dave
Hi: I have PL-PgSQL function that returns a set of records. It builds up 2 temp tables and then queries them to generate the set of records to be returned a-la for rrec in select t1.x, t2.x from t1, t2 where loop return next rrec; end loop; I noticed that it takes a

Re: [GENERAL] pl-pgsql "return set of..." "return next..." performance question

2007-11-16 Thread Pavel Stehule
hule [mailto:[EMAIL PROTECTED] > Sent: Friday, November 16, 2007 1:16 PM > To: Gauthier, Dave > Cc: pgsql-general@postgresql.org > Subject: Re: [GENERAL] pl-pgsql "return set of..." "return next..." > performance question > > Hello > > > > > I

Re: [GENERAL] pl-pgsql "return set of..." "return next..." performance question

2007-11-16 Thread Gauthier, Dave
ECTED] Sent: Friday, November 16, 2007 1:16 PM To: Gauthier, Dave Cc: pgsql-general@postgresql.org Subject: Re: [GENERAL] pl-pgsql "return set of..." "return next..." performance question Hello > > I noticed that it takes a long time to return the set of records. But if I

Re: [GENERAL] pl-pgsql "return set of..." "return next..." performance question

2007-11-16 Thread Pavel Stehule
Hello > > I noticed that it takes a long time to return the set of records. But if I > run the same query at the psql cli, it runs blindingly fast. So it appears > that the process of returning the records via "return next" is the > performance culprit. > > Any ideas? Try use holdable cursors h