Search Postgresql Archives

Re: left join with smaller table or index on (XXX is not null) to avoid upsert

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jan 19, 2009 at 12:12 AM, Grzegorz Jaśkiewicz <gryzman@xxxxxxxxx> wrote:> On Mon, Jan 19, 2009 at 2:44 AM, Scott Marlowe <scott.marlowe@xxxxxxxxx> 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 :)
Submit a patch. :)
But seriously, it's doing what you told it to do. There might becorner cases where you need a trigger to fire for a row on change, andshort-circuiting could cause things to fail in unexpected ways.
-- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)To make changes to your subscription:http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux