Re: Insert performance

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: Insert performance
Дата
Msg-id 45ED1996.7050008@archonet.com
обсуждение исходный текст
Ответ на Insert performance  ("hatman" <joel.winteregg@gmail.com>)
Ответы Re: Insert performance  (joël Winteregg <joel.winteregg@gmail.com>)
Список pgsql-performance
hatman wrote:
> Dear all,
>
> After many tests and doc reading, i finally try to get help from
> you...
>
> Here is my problem. With some heavy insert into a simple BD (one
> table, no indexes) i can't get better perf than 8000 inserts/sec. I'm
> testing it using a simple C software which use libpq and which use:
> - Insert prepared statement (to avoid too many request parsing on the
> server)
> - transaction of 100000 inserts

Are each of the INSERTs in their own transaction?

If so, you'll be limited by the speed of the disk the WAL is running on.

That means you have two main options:
1. Have multiple connections inserting simultaneously.
2. Batch your inserts together, from 10 to 10,000 per transaction.

Are either of those possible?

--
   Richard Huxton
   Archonet Ltd

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

Предыдущее
От: ismo.tuononen@solenovo.fi
Дата:
Сообщение: Re: query slows down after vacuum analyze
Следующее
От: Richard Huxton
Дата:
Сообщение: Re: Hibernate left join