Re: Quick select, slow update - help with performance problems

From: Richard Huxton <dev(at)archonet(dot)com>
To: Gary Stainburn <gary(dot)stainburn(at)ringways(dot)co(dot)uk>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Quick select, slow update - help with performance problems
Date: 2008-07-01 11:17:16
Message-ID: 486A123C.8050103@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Gary Stainburn wrote:
> update used_diary set
> ud_valet_completed=now(), ud_valet_completed_by=25
> where ud_valet_completed is null and
> ud_valet_required < CURRENT_DATE-'7 days'::interval
>
> is still running after approx 1 1/2 minutes. I've noticed that other updates
> also seem to take a long time.

Do you have any foreign keys referencing used_diary? Do they have the
correct indexes on the referencing tables?
Any on-update triggers?

--
Richard Huxton
Archonet Ltd

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Gary Stainburn 2008-07-01 12:42:14 Re: Quick select, slow update - help with performance problems
Previous Message Gary Stainburn 2008-07-01 10:20:41 Quick select, slow update - help with performance problems