Re: SELECT is immediate but the UPDATE takes forever

From: Alban Hertroys <dalroi(at)solfertje(dot)student(dot)utwente(dot)nl>
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 18:20:08
Message-ID: 0D381ED2-D380-434B-B91B-5FC16E01FB77@solfertje.student.utwente.nl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-interfaces

On 7 Dec 2010, at 15:45, Michał Roszka wrote:
>> but the same SELECT count, it's immediate:
>>
>> SELECT count(id) FROM comptes WHERE codi_compte LIKE '10000%' AND
>> empresa_id=2 AND nivell=11;
>
> Maybe there is any check or constraint on belongs_to_compte_id.comptes that
> might take longer?

Or a foreign key constraint or an update trigger, to name a few other possibilities.

Alban Hertroys

--
Screwing up is an excellent way to attach something to the ceiling.

!DSPAM:737,4cfe7af5802659106873227!

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Massa, Harald Armin 2010-12-07 18:23:58 is anyone from the pokertracker.com within this mailing list?
Previous Message Kobi Biton 2010-12-07 18:18:56 Re: *****SPAM***** Re: if-clause to an exiting statement

Browse pgsql-interfaces by date

  From Date Subject
Next Message Vick Khera 2010-12-08 17:18:05 Re: SELECT is immediate but the UPDATE takes forever
Previous Message Tom Lane 2010-12-07 15:37:40 Re: SELECT is immediate but the UPDATE takes forever