Hi David,Generally the JDBC spec stays clear of discussing the client-server protocol.
The behavior described by the JDBC method is the user-visible behavior. There are two roles involved in the behavior, which might be implemented by two different providers: the JDBC provider (client) and the database provider (server).
The JDBC spec doesn't mandate whether the behavior is implemented by one provider or the other. Where the server does have the ability to constrain the results there might be a way for the client to tell the server of the constraint, via the client-server protocol.
On May 11, 2007, at 3:29 PM, David Van Couvering wrote:
The behavior I want is to say get 10 rows at a time, with the least amount of processing and network overhead wasted on rows that I am not interested in yet. What's the strategy for this? the setMaxRows() method for Statement says: "Sets the limit for the maximum number of rows that any ResultSet object can contain to the given number. If the limit is exceeded, the excess rows are silently dropped." What I am wondering is, is there any way to tell the *server* to send only a certain number of rows, rather than the server processing all these rows and the client just dropping them. Also, how is maxrows related to the fetch size of a ResultSet?
As I understand it, the fetch size relates to the number of rows returned by the server to the client for each round trip to the database. So theoretically the two numbers are independent. There's no specified interaction except for the obvious one: requesting a fetch size exceeding the maxrows doesn't make sense since there will never be more than maxrows returned, and fetch size would effectively be ignored.
Craig
Thanks, David
Craig Russell Architect, Sun Java Enterprise System http://java.sun.com/products/jdo 408 276-5638 mailto:[EMAIL PROTECTED] P.S. A good JDO? O, Gasp!
smime.p7s
Description: S/MIME cryptographic signature
