Re: Fwd: My Query to insert and retrieve takes time

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Fwd: My Query to insert and retrieve takes time
Дата
Msg-id 6405.1320415686@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Fwd: My Query to insert and retrieve takes time  (Shivakumar Ramannavar <shivasr@gmail.com>)
Список pgsql-admin
Shivakumar Ramannavar <shivasr@gmail.com> writes:
> Here is some observation drawn from PostgreSQL performance testing:

> There are around 310,000 records, it takes 8.313 milliseconds to
> retrieval/search a record, and it takes 8.321 milliseconds more to update a
> record.

It was already pointed out to you that these numbers are suspiciously
close together, and also suspiciously close to the rotation time of a
7200RPM disk.  It seems very likely that you have configured things so
that each operation is done in a transaction that has to be explicitly
committed to disk, thus requiring a write to WAL, which would limit the
transaction rate to one per rotation.  However, since you haven't shown
us anything about how the queries are being issued, we can't confirm
or disprove that theory.

Consider batching multiple operations into a single transaction.
Turning off synchronous_commit is another possibility, depending on
what your crash-safety requirements are.

            regards, tom lane

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

Предыдущее
От: Shivakumar Ramannavar
Дата:
Сообщение: Fwd: My Query to insert and retrieve takes time
Следующее
От: Jelena
Дата:
Сообщение: PostgreSQL statement latency