Re: database slowdown while a lot of inserts occur - Mailing list pgsql-performance

From Bob Lunney
Subject Re: database slowdown while a lot of inserts occur
Date
Msg-id 1333246803.96113.YahooMailNeo@web162804.mail.bf1.yahoo.com
Whole thread Raw
In response to Re: database slowdown while a lot of inserts occur  (Tomas Vondra <tv@fuzzy.cz>)
List 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 by date:

Previous
From: Aidan Van Dyk
Date:
Subject: Re: Tablespaces on a raid configuration
Next
From: Ofer Israeli
Date:
Subject: TCP Overhead on Local Loopback