× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



The short answer is that it depends.

In my experience with Type 4 (remote access) JDBC Drivers, rows sent lazily
to the client side.  This means that only the data for a row (or possibly a
small block of rows) is sent to the client at once.  However, I don't
believe the spec states which way a driver has to work.  I would venture a
guess that most of your high end JDBC drivers (SQL Server, DB/2, iSeries
Toolkit, Oracle, etc) should operate that way.

It should be easy to test, however, by writing a small test harness that
creates a query that returns a small number of rows (50 or so?) and
exhausts that ResultSet.  Next, create a query that uses similar SQL as the
first query but returns a large number of rows (1 million?) and then
exhausts this new ResultSet as well.  Run each harness in profiling mode
and you should be able to track memory usage.  If you see a large spike in
memory usage on the second test compared to the first test, then you could
say that the driver is probably sending more of the ResultSet data down to
the client than the first.  Of course, this is perhaps an
over-simplification.

It would be helpful to know which JDBC Driver you are working with.

Chris DeLashmutt
Senior R&D Analyst
LeasePlan USA
1165 Sanctuary Pkwy., Alpharetta, GA 30004
Phone: 678-202-8695
Fax: 678-921-4895
ClearCase problems? Check out the LeasePlan ClearCase FAQ for answers!


                                                                                
                                                                  
                      CWilt@xxxxxxxxxxxx                                        
                                                                  
                      Sent by:                   To:       
java400-l@xxxxxxxxxxxx                                                          
       
                      java400-l-bounces@m        cc:                            
                                                                  
                      idrange.com                Subject:  Does JDBC have 
client-side and server-side cursors like ADO/ODBC?                      
                                                                                
                                                                  
                                                                                
                                                                  
                      11/03/2004 08:56 AM                                       
                                                                  
                      Please respond to                                         
                                                                  
                      Java Programming on                                       
                                                                  
                      and around the                                            
                                                                  
                      iSeries / AS400                                           
                                                                  
                                                                                
                                                                  
                                                                                
                                                                  




Using JDBC to connect the iSeries.

Going to have a stored procedure return a results set.

Trying to figure out if JDBC provides both "server-side" and "client-side"
cursors like ADO/ODBC does.

If so, which is the default and how do you use the other?

If not, is a JDBC cursor server-side or client-side?



For definition:

In a server-side cursor, each row set to the client when the client does
the
"next" method.

In a client-side cursor, the entire result set is sent to the client.
Thus,
no network traffic occurs moving back and forth in the results set.


Thanks in advance,


Charles Wilt
iSeries Systems Administrator / Programmer
Mitsubishi Electric Automotive America
ph: 513-573-4343
fax: 513-398-1121

--
This is the Java Programming on and around the iSeries / AS400 (JAVA400-L)
mailing list
To post a message email: JAVA400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/java400-l
or email: JAVA400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/java400-l.






As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.