pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrew McMillan <andrew@catalyst.net.nz>
To: Anjan Dave <adave@vantage.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: can't handle large number of INSERT/UPDATEs
Date: Wed, 27 Oct 2004 09:50:50 +1300
Message-ID: <1098823850.6440.89.camel@lamb.mcmillan.net.nz> (raw)
In-Reply-To: <4BAFBB6B9CC46F41B2AD7D9F4BBAF7850985D5@vt-pe2550-001.vantage.vantage.com>
References: <4BAFBB6B9CC46F41B2AD7D9F4BBAF7850985D5@vt-pe2550-001.vantage.vantage.com>

On Mon, 2004-10-25 at 16:53 -0400, Anjan Dave wrote:
> Hi,
> 
>  
> 
> I am dealing with an app here that uses pg to handle a few thousand
> concurrent web users. It seems that under heavy load, the INSERT and
> UPDATE statements to one or two specific tables keep queuing up, to
> the count of 150+ (one table has about 432K rows, other has about
> 2.6Million rows), resulting in ‘wait’s for other queries, and then
> everything piles up, with the load average shooting up to 10+. 

Hi,

We saw a similar problem here that was related to the locking that can
happen against referred tables for referential integrity.

In our case we had referred tables with very few rows (i.e. < 10) which
caused the insert and update on the large tables to be effectively
serialised due to the high contention on the referred tables.

We changed our app to implement those referential integrity checks
differently and performance was hugely boosted.

Regards,
					Andrew.
-------------------------------------------------------------------------
Andrew @ Catalyst .Net .NZ  Ltd,  PO Box 11-053, Manners St,  Wellington
WEB: http://catalyst.net.nz/            PHYS: Level 2, 150-154 Willis St
DDI: +64(4)803-2201      MOB: +64(272)DEBIAN      OFFICE: +64(4)499-2267
                        Chicken Little was right.
-------------------------------------------------------------------------

Attachments:

  signature.asc (application/pgp-signature, 188B) download

view thread (24+ messages)  latest in thread

Message-ID: <1098823850.6440.89.camel@lamb.mcmillan.net.nz>
Permalink:  ../1098823850.6440.89.camel@lamb.mcmillan.net.nz/
Also on:    postgresql.org/message-id/1098823850.6440.89.camel@lamb.mcmillan.net.nz

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: andrew@catalyst.net.nz, adave@vantage.com
  Subject: Re: can't handle large number of INSERT/UPDATEs
  In-Reply-To: <1098823850.6440.89.camel@lamb.mcmillan.net.nz>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox