[RFC] How about changing the default value of defaultRowFetchSize?

From: "Tsunakawa, Takayuki" <tsunakawa(dot)takay(at)jp(dot)fujitsu(dot)com>
To: List <pgsql-jdbc(at)postgresql(dot)org>
Subject: [RFC] How about changing the default value of defaultRowFetchSize?
Date: 2016-10-20 07:55:16
Message-ID: 0A3221C70F24FB45833433255569204D1F634237@G01JPEXMBYT05
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Hello,

Let me ask your opinion on whether the default value of defaultRowFetchSize can or should be changed. The current default value is 0, which means the driver fetches all rows at once when the result set is opened. I'd like to propose changing it to some small positive value because:

* It sometimes causes out-of-memory trouble when users' batch apps process many rows on the client side. They are often not aware of the fetch size, because they didn't experience the problem with the same app when using Oracle. Oracle's default fetch size is 10. They complained about the PostgreSQL's behavior. (OTOH, MySQL's JDBC driver fetches all rows by default like PostgreSQL.)

* If the performance is better when the fetch size is 0, then those who are keen to improve performance can find the method for tuning fetch size. I think it would be better to make the default setting more friendly for people who aren't so conscious of tuning.

Regards
Takayuki Tsunakawa

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Jeremy Whiting 2016-10-20 09:18:33 Re: Return Codes of BatchUpdateException in PostgreSql 9.6
Previous Message Robert Haas 2016-10-20 00:15:38 Re: Patch: Implement failover on libpq connect level.