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



Thank you for your clear response, Joe.

On 4 Dic, 17:41, "joeNOS...@xxxxxxx" <joe.weinst...@xxxxxxxxx> wrote:
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.

This is great news :)

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.

I don't know if this applies to SQL Server 2000 (and I'm using, if I'm
not wrong, the SQL Server 2005 JDBC drivers). If it does, then I'm
doing something wrong, as I get a JVM error saying that I exceed the
JVM thread memory limit (or something like that, I'm not at the office
now), with no work done (it should populate another table on another
database). Besides, I'm not sure I've ever encountered a ResultSet that
didn't need the complete fetch of the results before getting processed.
Has this something to do with CachedResultSets (that, sadly, are only
an interface in standard java)?

Joe Weinstein at BEA Systems

.



Relevant Pages

  • Re: Designfrage Client/ Server Applikation (SQL Server 2000)
    ... vom SQL Server 2000. ... fetch durch die Tabelle (Select SQLSTRING, DATUM, AKTIV FROM ... TABELLE) ... aber noch an den Output rankommen, um ihn per E-Mail zu versenden. ...
    (microsoft.public.de.german.entwickler.dotnet.datenbank)
  • Re: Help
    ... Wayne Snyder, MCDBA, SQL Server MVP ... > declare @i varchar ... >>fetch next from test into @tbnames ...
    (microsoft.public.sqlserver.server)
  • Re: Typed DataTable - NewRow() - Identity Field
    ... When you synch with the database you should have the data adaptor fetch ... The insert command would read something like (assuming your sql command ... 'This instructs the data adaptor to use the first returned result as the ... because that value should be prvided by SQL Server, ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Attempt to initiate a new SQL Server operation with results pending.
    ... >>I took a Perl-Gtk2 app which has been running fine, ... >>initiate a new SQL Server operation with results pending. ... The application gives the 'Attempt to initiate a new SQL Server ... It *should* fetch each row and dump the values to the ...
    (perl.dbi.users)
  • Re: count rows without count(*)
    ... is there a way how much columns are selected wihout select (fetch) ... most drivers don't return the correct value until ... If you simply want a row count, using SELECT countis the proper ...
    (perl.beginners)