Re: Need Some Explanation of an EXPLAIN - Mailing list pgsql-general

From Tom Lane
Subject Re: Need Some Explanation of an EXPLAIN
Date
Msg-id 27774.1222464300@sss.pgh.pa.us
Whole thread Raw
In response to Re: Need Some Explanation of an EXPLAIN  ("Scott Marlowe" <scott.marlowe@gmail.com>)
List pgsql-general
"Scott Marlowe" <scott.marlowe@gmail.com> writes:
> On Fri, Sep 26, 2008 at 12:13 PM, Bill Thoen <bthoen@gisnet.com> wrote:
>> 2.) How can I make this update faster?

> Get a faster server?

Increasing work_mem might help.  If the hashtable size estimate is
right, you'd need something like 100MB to be sure that the join gets
done in only one batch.

Also, if a lot of the rows needn't actually change, it'd be worthwhile
to add a WHERE clause:

 UPDATE growers
 SET grower_id = id2.grower_id
 FROM id2 WHERE growers.fsa_id = id2.fsa_id
      AND growers.grower_id != id2.grower_id

            regards, tom lane

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Is there any way to reliably influence WHERE predicate evaluation ordering?
Next
From: Decibel!
Date:
Subject: Re: Is there any way to reliably influence WHERE predicate evaluation ordering?