Re: large inserts and fsync

From: Aaron Burnett <aburnett(at)bzzagent(dot)com>
To: Sam Mason <sam(at)samason(dot)me(dot)uk>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: large inserts and fsync
Date: 2008-09-05 15:19:13
Message-ID: C4E6C631.36A4%aburnett@bzzagent.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


Yes, the developer already made sure of that and I verified.

On 9/5/08 11:10 AM, "Sam Mason" <sam(at)samason(dot)me(dot)uk> wrote:

> On Fri, Sep 05, 2008 at 09:16:41AM -0400, Aaron Burnett wrote:
>> For an upcoming release there is a 16 million row insert that on our test
>> cluster takes about 2.5 hours to complete with all indices dropped
>> beforehand.
>>
>> If I turn off fsync, it completes in under 10 minutes.
>
> Have you tried bundling all the INSERT statements into a single
> transaction? If you haven't then PG will run each statement in its own
> transaction and then commit each INSERT statement to disk separately,
> incurring large overheads.
>
>
> Sam

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2008-09-05 15:22:06 Re: max_stack_depth Exceeded
Previous Message Sam Mason 2008-09-05 15:10:47 Re: large inserts and fsync