Re: [RFC] How about changing the default value ofdefaultRowFetchSize? - Mailing list pgsql-jdbc

From Tsunakawa, Takayuki
Subject Re: [RFC] How about changing the default value ofdefaultRowFetchSize?
Date
Msg-id 0A3221C70F24FB45833433255569204D1F6360B5@G01JPEXMBYT05
Whole thread Raw
In response to Re: [RFC] How about changing the default value of defaultRowFetchSize?  (Dave Cramer <pg@fastcrypt.com>)
Responses Re: [RFC] How about changing the default value of defaultRowFetchSize?  (Dave Cramer <pg@fastcrypt.com>)
List pgsql-jdbc
From: davecramer@gmail.com [mailto:davecramer@gmail.com] On Behalf Of
> Dave Cramer
> This is what I take issue with. It should return 0 which means that it has
> not been set. What use is it to the user ?

I'm sorry to repeat myself.  According to the API doc, the use of getFetchSize() is to retrieve the number of result
setrows, not the hint value.  So, I thought 0 was not appropriate because 0 is only a valid hint value passed to
setFetchSize().  Which sentence in what document does your returning 0 follow?
 

http://docs.oracle.com/javase/7/docs/api/java/sql/Statement.html

Retrieves the number of result set rows that is the default fetch size for ResultSet objects generated from this
Statementobject. If this Statement object has not set a fetch size by calling the method setFetchSize, the return value
isimplementation-specific.
 

Returns:the default fetch size for result sets generated from this Statement object



> 1000 has been determined to be optimal. Both Vladimir and I have done
> performance testing on this. Also it won't matter to the user, since if
> they only have 100 rows they will only get 100 rows back anyway. 1000 rows
> should be able to fit into any reasonable client machines memory

OK, agreed.

Regards
Takayuki Tsunakawa


pgsql-jdbc by date:

Previous
From: "Tsunakawa, Takayuki"
Date:
Subject: Re: [RFC] How about changing the default value of defaultRowFetchSize?
Next
From: Dave Cramer
Date:
Subject: Re: [RFC] How about changing the default value of defaultRowFetchSize?