Re: How would I get information regarding update when running for a long time? - Mailing list pgsql-general

From Sam Mason
Subject Re: How would I get information regarding update when running for a long time?
Date
Msg-id 20090722223942.GT5407@samason.me.uk
Whole thread Raw
In response to How would I get information regarding update when running for a long time?  (Chris Barnes <compuguruchrisbarnes@hotmail.com>)
List pgsql-general
On Wed, Jul 22, 2009 at 10:00:38AM -0400, Chris Barnes wrote:
> 1) is this update expected to take this long?

1.5 hours is pretty slow, a couple of things spring to mind as to what
would make it go slow:

 1) it could be waiting for a lock (the pg_locks and pg_stat_activity
    views may help here)

 2) maintaining all those indexes is going to be slow (vmstat or better
    iostat will tell you what your system/disks are doing)

> 2) is there something that I did wrong with the update causing this
> slow time?

None of those indexes are enforcing a UNIQUE constraint, are you sure
that the id column in those tables uniquely identify the rows in the
table?  This isn't going to make it slow, but will cause you to get a
non-deterministic (i.e. normally "wrong") answer.

--
  Sam  http://samason.me.uk/

pgsql-general by date:

Previous
From: Nathan Jahnke
Date:
Subject: plperl spi_prepare and arrays
Next
From: Andreas Wenk
Date:
Subject: Re: Can LIKE under utf8 use INDEXes?