Re: COPY and indices? - Mailing list pgsql-general

From François Beausoleil
Subject Re: COPY and indices?
Date
Msg-id D78A93782734437B94C4D972CC9C3080@ftml.net
Whole thread Raw
In response to Re: COPY and indices?  (Merlin Moncure <mmoncure@gmail.com>)
Responses Re: COPY and indices?
List pgsql-general

Le mardi 13 mars 2012 à 10:48, Merlin Moncure a écrit :

> 2012/3/12 François Beausoleil <francois@teksol.info (mailto:francois@teksol.info)>:
> > Currently, I can sustain 30-40 writes per second on a Rackspace VPS. I know it's not the ideal solution, but that's
whatI'm working with. Following vmstat, the server is spending 30 to 40% of it's time in iowait. I don't have
measurementsas to what files are touched, and I'd welcome suggestions to measure the time PostgreSQL actually spends
writingindices vs data. 
> > >
> >
> >
>
>
> you're almost certainly blocking on fsync. A real quick'n'dirty way
> to confirm this (although it wont be as fast as COPY) would be to wrap
> your inserts in a transaction. VMs tend to have really horrible
> storage latency which can hurt postgres performance. Another option
> would be to relax your commit policy (for example by flipping
> synchronous_commit) if that fits within your safety requirements.
>


I already applied the tricks you have here: I have a transaction, and synchronous_commit is off. I also have
checkpoint_segmentsset to 96, and 10 minutes. 

I'll go with the COPY, since I can live with the batched requirements just fine.

Bye!
François


pgsql-general by date:

Previous
From: Merlin Moncure
Date:
Subject: Re: COPY and indices?
Next
From: Scott Marlowe
Date:
Subject: Re: COPY and indices?