Re: How to speed-up inserts with jdbc

Поиск
Список
Период
Сортировка
От Jeff
Тема Re: How to speed-up inserts with jdbc
Дата
Msg-id 1DFE91CA-3320-11D9-9406-000D9366F0C4@torgo.978.org
обсуждение исходный текст
Ответ на How to speed-up inserts with jdbc  (Michael Kleiser <mkl@webde-ag.de>)
Список pgsql-performance
On Nov 10, 2004, at 8:51 AM, Michael Kleiser wrote:
> It is trunning in in 10 Threads. Each thread makes 100 Inserts:
>
> For the 1000 Inserts (10 threads a 100 inserts)
> we need 8 seconds.
> That's 125 Insets / Seconds.
> How could we make it faster ?
>

Batch the inserts up into a transaction.

So you'd have
BEGIN
insert
insert
insert
...
COMMIT

Your numbers will suddenly sky rocket.

--
Jeff Trout <jeff@jefftrout.com>
http://www.jefftrout.com/
http://www.stuarthamm.net/


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

Предыдущее
От: Michael Kleiser
Дата:
Сообщение: How to speed-up inserts with jdbc
Следующее
От: Dave Cramer
Дата:
Сообщение: Re: How to speed-up inserts with jdbc