Re: Poor addBatch performance. Why dosn't it use copy ?

Поиск
Список
Период
Сортировка
От Ido M. Tamir
Тема Re: Poor addBatch performance. Why dosn't it use copy ?
Дата
Msg-id 200704201602.32397.tamir@imp.univie.ac.at
обсуждение исходный текст
Ответ на Poor addBatch performance. Why dosn't it use copy ?  (femski <hypertree@yahoo.com>)
Список pgsql-jdbc
On Friday 20 April 2007 13:39, femski wrote:
> Folks !
>

> "I actually went and looked at the JDBC api and realized 'addBatch' means
> to run multiple stmts at once, not batch
> inserting.  femski, your best bet is to lobby the JDBC folks to build
> support for 'copy' into the driver for faster bulk loads (or help out in
> that regard). "
>
> Based on other responses  I am convinced this is indeed the problem and I
> think its a pretty serious limitation.
>
> Why doesn't the Postgres JDBC driver use "copy" for faster bulk insert ?
> What is the best way to speedup
> do bulk insert at this time or in near future (I was to use standard JDBC
> API) ?

I would also love to have copy support (again) in the driver, but
did you actually test that it would speed up your inserts?
You could save your 4m rows into a txt file and then
something like

cat file.out | psql -d db -c "copy table from stdin delimiter '\t';"
and then you would know if copy would really speed your
inserts up.

best wishes
ido




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

Предыдущее
От: Giuseppe Sacco
Дата:
Сообщение: Re: Poor addBatch performance. Why dosn't it use copy ?
Следующее
От: Kris Jurka
Дата:
Сообщение: Re: Poor addBatch performance. Why dosn't it use copy ?