Re: SELECT is immediate but the UPDATE takes forever

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Michał Roszka <mike(at)if-then-else(dot)pl>
Cc: Raimon Fernandez <coder(at)montx(dot)com>, pgsql-general List <pgsql-general(at)postgresql(dot)org>
Subject: Re: SELECT is immediate but the UPDATE takes forever
Date: 2010-12-07 15:37:40
Message-ID: 22559.1291736260@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-interfaces

=?utf-8?b?TWljaGHFgg==?= Roszka <mike(at)if-then-else(dot)pl> writes:
> Quoting Raimon Fernandez <coder(at)montx(dot)com>:
>> I want to understand why one of my postgresql functions takes an
>> eternity to finish.

> Maybe there is any check or constraint on belongs_to_compte_id.comptes that
> might take longer?

Or maybe the UPDATE is blocked on a lock ... did you look into
pg_stat_activity or pg_locks to check?

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2010-12-07 15:45:21 Re: regexp err msg question
Previous Message Adrian Klaver 2010-12-07 15:36:49 Re: if-clause to an exiting statement

Browse pgsql-interfaces by date

  From Date Subject
Next Message Alban Hertroys 2010-12-07 18:20:08 Re: SELECT is immediate but the UPDATE takes forever
Previous Message Raimon Fernandez 2010-12-07 15:14:28 Re: SELECT is immediate but the UPDATE takes forever