Re: Suggestions on an update query

From: "Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com>
To: "Campbell, Lance" <lance(at)uiuc(dot)edu>
Cc: "Gregory Stark" <stark(at)enterprisedb(dot)com>, "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>, pgsql-performance(at)postgresql(dot)org
Subject: Re: Suggestions on an update query
Date: 2007-10-30 05:19:42
Message-ID: dcc563d10710292219h414a607ft9e719b33e1981b0d@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On 10/29/07, Campbell, Lance <lance(at)uiuc(dot)edu> wrote:
> Thanks for all of your help. The problem was that the result_entry table
> had some constraints that pointed to a third table. When I removed
> those constraints the performance was amazing. The update took less
> than seven minutes to execute. I did not even consider the fact that
> constraints to another table would impact the performance.

Usually you can put an index on the refrerenced key in the foreign
table to speed things up.

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Mark Kirkwood 2007-10-30 05:46:22 Re: partitioned table and ORDER BY indexed_field DESC LIMIT 1
Previous Message Luke Lonergan 2007-10-30 05:06:02 Re: partitioned table and ORDER BY indexed_field DESC LIMIT 1