Re: How would I get information regarding update when running for a long time?

From: Sam Mason <sam(at)samason(dot)me(dot)uk>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: How would I get information regarding update when running for a long time?
Date: 2009-07-22 22:39:42
Message-ID: 20090722223942.GT5407@samason.me.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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/

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Andreas Wenk 2009-07-22 22:45:41 Re: Can LIKE under utf8 use INDEXes?
Previous Message Nathan Jahnke 2009-07-22 22:30:12 plperl spi_prepare and arrays