Re: Server-side cursors for ResultSets - a pattern? (and what about Oracle?)





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

.



Relevant Pages

  • Re: php query for 2 fields - 1 being distinct
    ... As far as I know, DISTINCT is not a function in Oracle, MySQL or SQL Server. ... Of course, you can always fetch the complete dataset and filter out with PHP, but you should have a very good reason to do so. ...
    (comp.lang.php)
  • Re: Any experience with really large, high transaction databases?
    ... I wonder if the reason everyone thinks of SQL Server as being lower end is ... > Server than to run Oracle. ... Because for some reason, due to the way SQL Server is marketed vs. ... >> We are beginning to design a database for a new project. ...
    (microsoft.public.sqlserver.server)
  • Re: sql server / oracle
    ... Of course both on a Windows Server right? ... I see not reason why you should not be able to ... ... > Is OK to run both SQL Server and Oracle on same server? ...
    (microsoft.public.sqlserver.server)
  • Re: sql server / oracle?
    ... Of course both on a Windows Server right? ... I see not reason why you should not be able to ... ... > Is OK to run both SQL Server and Oracle on same server? ...
    (microsoft.public.sqlserver.setup)
  • Re: IOT, memory and transaction time
    ... easily generate it with DBMS_METADATA.GET_DDL if your verison of Oracle ... were pretty consistent no matter how big the table (this transaction ... FOREIGN KEY (versionNo) REFERENCES T_TRANSACTIONS, ... Oracle provides read consistency and SQL Server ...
    (comp.databases.oracle.misc)