Re: Server-side cursors for ResultSets - a pattern? (and what about Oracle?)
- From: "joeNOSPAM@xxxxxxx" <joe.weinstein@xxxxxxxxx>
- Date: 4 Dec 2006 08:41:05 -0800
On Dec 4, 7:56 am, "StM" <stm...@xxxxxxxxx> wrote:
I need to find a way to obtain server-side cursors using JDBC with both
Oracle and SQL Server, with the least possible amount of differences.
The reason for this anti-performance request: I have to import huge
tables, for a one-time execution, possibly without using third party
drivers and having no criteria to fetch the data in a number of smaller
amounts.
In the long and terrifying following dissertation I report the only way
I've found to do this in SQL Server (I've still to test it); what about
Oracle? Do you have any hints, in particular or in general?
Thank you
StM
With Oracle, you typically will get limited amounts of result set
data at a time anyway. Just define the statement as you have,
with forward-only and read-only. Setting a fetch size is OK,
but not min-int ;). Set it to something reasonable so you can
get some rows at once for some performance, say 100.
With Sybase or SQLServer, by default, you'd get all the
data sent out at once, but it doesn't immediately invade
client memory as long as you read it and process it immediately.
It is buffered up in the network and at the DBMS while you read
it. Only if you try to run another statement before fully processing
the query, do you cause the driver to have to buffer everything.
selectMethod=cursor does work for MS drivers, and there
will be a Sybase analog, but as I said, it isn't necessary if you
just process the result as it shows up.
Joe Weinstein at BEA Systems
.
- Follow-Ups:
- References:
- Prev by Date: Server-side cursors for ResultSets - a pattern? (and what about Oracle?)
- Next by Date: Re: Server-side cursors for ResultSets - a pattern? (and what about Oracle?)
- Previous by thread: Server-side cursors for ResultSets - a pattern? (and what about Oracle?)
- Next by thread: Re: Server-side cursors for ResultSets - a pattern? (and what about Oracle?)
- Index(es):
Relevant Pages
|