Re: left join with smaller table or index on (XXX is not null) to avoid upsert - Mailing list pgsql-general

From Grzegorz Jaśkiewicz
Subject Re: left join with smaller table or index on (XXX is not null) to avoid upsert
Date
Msg-id 2f4958ff0901182312g3841445dn3c53fb008bb5faed@mail.gmail.com
Whole thread Raw
In response to Re: left join with smaller table or index on (XXX is not null) to avoid upsert  ("Scott Marlowe" <scott.marlowe@gmail.com>)
Responses Re: left join with smaller table or index on (XXX is not null) to avoid upsert
List pgsql-general
On Mon, Jan 19, 2009 at 2:44 AM, Scott Marlowe <scott.marlowe@gmail.com> wrote:
> Watch out for bloat when doing this.  A simple where change of
>
> update table set b = 45 ;
>
> to
>
> update table set b = 45 where b <> 45 ;
>
> can save the db a lot of work, and if you can apply the same logic to
> your update to save some dead tuples it's worth looking into.

I wonder why DB can't do it on its own :)

--
GJ

pgsql-general by date:

Previous
From: "Scott Marlowe"
Date:
Subject: Re: left join with smaller table or index on (XXX is not null) to avoid upsert
Next
From: "Scott Marlowe"
Date:
Subject: Re: left join with smaller table or index on (XXX is not null) to avoid upsert