Slow insert

From: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
To: pgsql-performance(at)postgresql(dot)org
Subject: Slow insert
Date: 2004-12-08 02:42:19
Message-ID: 41B66A0B.1090003@familyhealth.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Hi guys,

Why would an INSERT ever be really slow? This is what I see a lot of in
our site logs:

Dec 5 15:57:48 marshall postgres[19599]: [3-1] LOG: duration:
13265.492 ms statement: INSERT INTO users_sessions (sid, cobrand_id,
uid) VALUES ('145982ac39e1d09fec99cc8a606155e7', '1', '0')

13 seconds to insert a single row!

It seems to happen at random times during the day. That sessions table
is heavily updated and inserted, and has pg_autovacuum running vacuum
analyze and analyze on it every few minutes I think.

We don't run any exclusive lock stuff on it.

So what lock or concurrency issue could cause a single-row insert to
take 13 seconds? Could vacuum analyze be doing it?

Thanks,

Chris

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Stacy White 2004-12-08 04:32:49 Re: Partitioned table performance
Previous Message Joshua D. Drake 2004-12-07 18:35:03 Re: Fwd: 8.0 vs. 7.4 benchmarks