Re: Resurrected thread: Speed improvement - Group batch Insert - Rewrite the INSERT at the driver level (using a parameter)

Поиск
Список
Период
Сортировка
От Jeremy Whiting
Тема Re: Resurrected thread: Speed improvement - Group batch Insert - Rewrite the INSERT at the driver level (using a parameter)
Дата
Msg-id 551933AC.4050107@redhat.com
обсуждение исходный текст
Ответ на Re: Resurrected thread: Speed improvement - Group batch Insert - Rewrite the INSERT at the driver level (using a parameter)  (Dave Cramer <pg@fastcrypt.com>)
Ответы Re: Resurrected thread: Speed improvement - Group batch Insert - Rewrite the INSERT at the driver level (using a parameter)
Список pgsql-jdbc
Hi Dave,
  Yes I noticed query parsing doesn't occur in the code base. I do hope
avoiding query parsing is not going to be avoided outright ;)
  I suggest an optimization like this should be enabled only through
configuration. Using a connection parameter. So the default driver
behaviour will continue to avoid query parsing.

  I agree the small batch size is a meagre improvement. Putting on my
red hat I have customers and community users seeking any improvement
possible using batching. They see the optimization in the MySQL jdbc
driver and want to have some of that too as they are using
PostgreSQL/EnterpriseDB and do not have the option to change.


  Having investigated this optimization and the issues in Git there is a
particular case I wish to avoid/de-scope. That is INSERT statements with
RETURNING. I see there are a number of open issues that Craig Ringer is
investigating.

  At the moment I am coding changes to the driver [3] with the intention
of proposing they be added. Along with test cases to add coverage for
existing default behaviour and expected behaviour when the optimization
is enabled.

Jeremy

[3] https://github.com/whitingjr/pgjdbc/tree/batched-insert-rewrite

On 28/03/15 18:01, Dave Cramer wrote:
> Hi Jeremy,
>
> As Oliver pointed out in the response to [1] this would require
> parsing the query which we avoid.
>
> I also note that this approach isn't much of an improvement for small
> batches. I am curious what is your real world use case that prompted
> this experiment ?
>
> Dave
>
> Dave Cramer
>
> dave.cramer(at)credativ(dot)ca
> http://www.credativ.ca



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

Предыдущее
От: Dave Cramer
Дата:
Сообщение: Re: Resurrected thread: Speed improvement - Group batch Insert - Rewrite the INSERT at the driver level (using a parameter)
Следующее
От: Dave Cramer
Дата:
Сообщение: Re: Resurrected thread: Speed improvement - Group batch Insert - Rewrite the INSERT at the driver level (using a parameter)