Re: database slowdown while a lot of inserts occur

Поиск
Список
Период
Сортировка
От Bob Lunney
Тема Re: database slowdown while a lot of inserts occur
Дата
Msg-id 1333246803.96113.YahooMailNeo@web162804.mail.bf1.yahoo.com
обсуждение исходный текст
Ответ на Re: database slowdown while a lot of inserts occur  (Tomas Vondra <tv@fuzzy.cz>)
Список pgsql-performance
Tomas,

You are correct.  I was assuming that each insert was issued as an implicit transaction, without the benefit of an explicit BEGIN/COMMIT batching many of them together, as I've seen countless times in tight loops trying to pose as a batch insert.

Bob



From: Tomas Vondra <tv@fuzzy.cz>
To: pgsql-performance@postgresql.org
Sent: Friday, March 30, 2012 8:11 PM
Subject: Re: [PERFORM] database slowdown while a lot of inserts occur

On 29.3.2012 21:27, Bob Lunney wrote:
> Lance,
>
> May small inserts cause frequent fsyncs.  Is there any way those small
> inserts can be batched into some larger sets of inserts that use copy to
> perform the load?

Not necessarily - fsync happens at COMMIT time, not when the INSERT is
performed (unless each INSERT stands on it's own).

Tomas

--
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance


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

Предыдущее
От: Aidan Van Dyk
Дата:
Сообщение: Re: Tablespaces on a raid configuration
Следующее
От: Ofer Israeli
Дата:
Сообщение: TCP Overhead on Local Loopback