From: | Dave Cramer <pg(at)fastcrypt(dot)com> |
---|---|
To: | "Tsunakawa, Takayuki" <tsunakawa(dot)takay(at)jp(dot)fujitsu(dot)com> |
Cc: | List <pgsql-jdbc(at)postgresql(dot)org> |
Subject: | Re: [RFC] How about changing the default value of defaultRowFetchSize? |
Date: | 2016-10-20 11:22:35 |
Message-ID: | CADK3HH+xQbJoDXmhQEeXbdR5h+ELV+72oP36PtMgfuzFNDUDVA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
Hi,
It is important to note that fetch size only works when autocommit is off.
The implication here is:
1) fetch size has no bearing whatsoever for most people.
2) You have to know that fetch size only works in a transaction so you
should be sophisticated enough to set it.
OTOH, I have no objection to setting it to say 100
Dave Cramer
davec(at)postgresintl(dot)com
www.postgresintl.com
On 20 October 2016 at 03:55, Tsunakawa, Takayuki <
tsunakawa(dot)takay(at)jp(dot)fujitsu(dot)com> wrote:
> 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
>
>
>
> --
> Sent via pgsql-jdbc mailing list (pgsql-jdbc(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-jdbc
>
From | Date | Subject | |
---|---|---|---|
Next Message | Jeremy Whiting | 2016-10-20 11:36:02 | Re: Return Codes of BatchUpdateException in PostgreSql 9.6 |
Previous Message | Vladimir Sitnikov | 2016-10-20 10:01:05 | Re: Return Codes of BatchUpdateException in PostgreSql 9.6 |