Re: Quick select, slow update - help with performance problems - Mailing list pgsql-sql

From Richard Huxton
Subject Re: Quick select, slow update - help with performance problems
Date
Msg-id 486A123C.8050103@archonet.com
Whole thread Raw
In response to Quick select, slow update - help with performance problems  (Gary Stainburn <gary.stainburn@ringways.co.uk>)
Responses Re: Quick select, slow update - help with performance problems
List 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


pgsql-sql by date:

Previous
From: Gary Stainburn
Date:
Subject: Quick select, slow update - help with performance problems
Next
From: Gary Stainburn
Date:
Subject: Re: Quick select, slow update - help with performance problems