LIBPQ: Can we have buffered PGresult (i.e. a retreival bu chuncks?)

Started by Abraham, Dannyover 18 years ago4 messagesgeneral
Jump to latest
#1Abraham, Danny
danny_abraham@bmc.com

Is there a way to break the PGresult array to chunks
Like Oracle?

Thanks

Danny Abraham
BMC Software
CTM&D Business Unit
972-52-4286-513
danny_abraham@bmc.com

#2Reg Me Please
regmeplease@gmail.com
In reply to: Abraham, Danny (#1)
Re: LIBPQ: Can we have buffered PGresult (i.e. a retreival bu chuncks?)

Il Thursday 22 November 2007 16:23:25 Abraham, Danny ha scritto:

Is there a way to break the PGresult array to chunks
Like Oracle?

Thanks

Danny Abraham
BMC Software
CTM&D Business Unit
972-52-4286-513
danny_abraham@bmc.com

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

I presume that the usal LIMIT+OFFSET solution is not OK.
Right?

--
Reg me Please
<Non quietis maribus nauta>

#3Bruce Momjian
bruce@momjian.us
In reply to: Abraham, Danny (#1)
Re: LIBPQ: Can we have buffered PGresult (i.e. a retreival bu chuncks?)

"Abraham, Danny" <danny_abraham@bmc.com> writes:

Is there a way to break the PGresult array to chunks
Like Oracle?

There isn't a protocol-level way but there is a way in SQL, use cursors and
"FETCH FORWARD <n>"

--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com
Ask me about EnterpriseDB's 24x7 Postgres support!

#4Alvaro Herrera
alvherre@2ndquadrant.com
In reply to: Abraham, Danny (#1)
Re: LIBPQ: Can we have buffered PGresult (i.e. a retreival bu chuncks?)

Abraham, Danny wrote:

Is there a way to break the PGresult array to chunks
Like Oracle?

Sure. Use a cursor.

--
Alvaro Herrera http://www.PlanetPostgreSQL.org/
"Right now the sectors on the hard disk run clockwise, but I heard a rumor that
you can squeeze 0.2% more throughput by running them counterclockwise.
It's worth the effort. Recommended." (Gerry Pourwelle)