From: David Wall <d.wall@computer.org>
To: pg@fastcrypt.com
Cc: pgsql-jdbc@postgresql.org
Subject: Re: JDBC and processing large numbers of rows
Date: Tue, 11 May 2004 13:32:29 -0700
Message-ID: <036601c43797$4312ee40$3201a8c0@rasta> (raw)
References: <20040511103520.1ADC6D1B1EE@svr1.postgresql.org>
<40A0CB55.5060400@opencloud.com>
<024101c4376d$d567d050$3201a8c0@rasta>
<1084305394.1534.121.camel@localhost.localdomain>
> Use cursors to page through really large result sets
Well, I've thought about that, but that just led me to my 3rd question in my
previous inquiry:
> > 3) How do people use cursors in JDBC? Being able to FETCH seems like a
nice
> > way to handle question #2 above in a batch program, since only a subset
of
> > rows needs to be retrieved from the db at a time. Cursors probably
don't
> > work for question #1 above since keeping a transaction alive across page
> > views is generally frowned upon and even hard to accomplish since it
means
> > locking up a connection to the db for each paging user.
The question for me is how do you portably use cursors so that you can work
with Oracle and PG seamlessly? I presume there might be some (hopefully)
slight variations, like there are with BLOBs, but it would be nice if using
cursors was standardized enough to make it using standard JDBC.
It seems that the issues are with defining a cursor, executing it, fetching
against it, then release it when done. Is there a standard way to do this?
Any examples?
Thanks,
David
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: d.wall@computer.org, pg@fastcrypt.com
Subject: Re: JDBC and processing large numbers of rows
In-Reply-To: <036601c43797$4312ee40$3201a8c0@rasta>
References: <20040511103520.1ADC6D1B1EE@svr1.postgresql.org> <40A0CB55.5060400@opencloud.com> <024101c4376d$d567d050$3201a8c0@rasta> <1084305394.1534.121.camel@localhost.localdomain> <036601c43797$4312ee40$3201a8c0@rasta>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox