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

Поиск
Список
Период
Сортировка
От Vladimir Sitnikov
Тема Re: [RFC] How about changing the default value of defaultRowFetchSize?
Дата
Msg-id CAB=Je-GS1xewXds4d4pj-OtfshrJdVpwbQE+vd9CMCB99s8iOQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [RFC] How about changing the default value of defaultRowFetchSize?  (Jorge Solórzano <jorsol@gmail.com>)
Ответы Re: [RFC] How about changing the default value of defaultRowFetchSize?
Re: [RFC] How about changing the default value of defaultRowFetchSize?
Список pgsql-jdbc
Jorge>The value of 0 should be used to fetch all rows, if we ​leave the default at 0 and handle internally that as 100 (and reporting it as 0) it is a wrong behavior.

Note that "unset" and "set to 0" might have different meanings for a good (or bad?) reason.

There's non-zero overhead when using low fetch sizes for narrow tables: https://github.com/pgjdbc/pgjdbc/issues/292#issuecomment-107249028
E.g. 1.7 times difference for fetchsize 1000 and 100 for fetching 2000 rows of 4 int4 over localhost connection.

Ideally, I would like the backend to support "fetch at most 10000 rows and at most 1MiB" kind of requests.

Unfortunately, PG does not yet support "byte size limited" fetches, so we might implement some "machine learning" trick: "fetch 100 rows, calculate average row size, then adjust fetch size so subsequent fetch would be close to the desired "fetch byte length"


Anyway, I think it makes sense to switch to some non-zero value for defaultRowFetchSize, then implement "fetch size autoscaling".

Vladimir

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Jorge Solórzano
Дата:
Сообщение: Re: [RFC] How about changing the default value of defaultRowFetchSize?
Следующее
От: Jorge Solórzano
Дата:
Сообщение: Re: [RFC] How about changing the default value of defaultRowFetchSize?