Re: Insert speed new post - Mailing list pgsql-general

From Tom Lane
Subject Re: Insert speed new post
Date
Msg-id 22615.1183409710@sss.pgh.pa.us
Whole thread Raw
In response to Insert speed new post  (Terry Fielder <terry@ashtonwoodshomes.com>)
Responses Re: Insert speed new post
List pgsql-general
Terry Fielder <terry@ashtonwoodshomes.com> writes:
> Under pg 7.x the system performed fine.

> In 8.1.9, the insert statements seem to take a long time sometimes, upto
> several seconds or more.

> There is no primary key, but the table is never updated, only inserted.
> I removed the only index, with no improvement in performance (in case
> the 8.2 "resolves index locking issues" was the concern for an 8.1 install.

Hmm.  With no indexes, inserts ought to be basically a constant-time
operation.  I suspect what you are looking at is stalls caused by
checkpoints or other competing disk activity.  I'd suggest watching the
output of "vmstat 1" or local equivalent, and seeing if you can
correlate the slow inserts with bursts of disk activity.

Have you tuned the 8.1 installation?  I'm wondering about things like
checkpoint_segments and wal_buffers maybe being set lower than you had
them in 7.4.

            regards, tom lane

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: recovery_target_time ignored or recovery always recovers to end of WAL
Next
From: "Simon Riggs"
Date:
Subject: Re: recovery_target_time ignored orrecoveryalwaysrecovers to end of WAL