Re: How Many Inserts Per Transactions

Поиск
Список
Период
Сортировка
От Hannu Krosing
Тема Re: How Many Inserts Per Transactions
Дата
Msg-id 1060152153.4517.9.camel@fuji.krosing.net
обсуждение исходный текст
Ответ на How Many Inserts Per Transactions  (Trevor Astrope <astrope@e-corp.net>)
Список pgsql-performance
Trevor Astrope kirjutas T, 05.08.2003 kell 18:59:
> I was wondering if anyone found a sweet spot regarding how many inserts to
> do in a single transaction to get the best performance? Is there an
> approximate number where there isn't any more performance to be had or
> performance may drop off?
>
> It's just a general question...I don't have any specific scenario, other
> than there are multiple backends doing many inserts.

I did test on huge (up to 60 million rows) simple table (5 fields with
primary key) and found that at that size many inserts per transaction
was actually a little slower than single inserts. It probably had to do
with inserting/checking new index entries and moving index pages from/to
disk.

With small sizes or no index ~100 inserts/transaction was significantly
faster though.

I did run several (10-30) backends in parallel.

The computer was quad Xeon with 2GB RAM and ~50 MB/sec RAID.

------------------
Hannu


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

Предыдущее
От: Neil Conway
Дата:
Сообщение: Re: Some vacuum & tuning help
Следующее
От: Yaroslav Mazurak
Дата:
Сообщение: PostgreSQL performance problem -> tuning