Re: Slow insert

From: "Steinar H(dot) Gunderson" <sgunderson(at)bigfoot(dot)com>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: Slow insert
Date: 2004-12-11 01:45:28
Message-ID: 20041211014528.GA16264@uio.no
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Wed, Dec 08, 2004 at 10:42:19AM +0800, Christopher Kings-Lynne wrote:
> 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!

Do you have a foreign key or other check which could be really slow?

/* Steinar */
--
Homepage: http://www.sesse.net/

In response to

  • Slow insert at 2004-12-08 02:42:19 from Christopher Kings-Lynne

Browse pgsql-performance by date

  From Date Subject
Next Message Stephan Szabo 2004-12-11 02:28:38 Re: Query is not using index when it should
Previous Message Mike Rylander 2004-12-10 18:40:02 LIMIT causes SEQSCAN in subselect