Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id 8E1E7172C062 for ; Sun, 4 Dec 2011 16:07:36 -0400 (AST) Received: from andy.depesz.com ([88.198.47.100] helo=depesz.com) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1RXILW-0004Xy-MA for pgsql-bugs@postgresql.org; Sun, 04 Dec 2011 20:07:36 +0000 Received: from andy.depesz.com ([88.198.47.100] helo=depesz.com) by depesz.com with esmtpa (Exim 4.77) (envelope-from ) id 1RXILJ-0005YR-7L; Sun, 04 Dec 2011 21:07:21 +0100 Date: Sun, 4 Dec 2011 21:07:21 +0100 From: hubert depesz lubaczewski To: dmigowski@ikoffice.de Cc: pgsql-bugs@postgresql.org Subject: Re: BUG #6325: Useless Index updates Message-ID: <20111204200720.GA18582@depesz.com> Reply-To: depesz@depesz.com References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Pg-Spam-Score: -3.1 (---) X-Archive-Number: 201112/33 X-Sequence-Number: 31844 On Sun, Dec 04, 2011 at 12:54:25PM +0000, dmigowski@ikoffice.de wrote: > It seems that an update to a row in a table always removes the element from > an index and adds it again. Wouldn't it be faster to check for equality of > the index parameters in the OLD and NEW record first? http://www.depesz.com/index.php/2008/11/05/waiting-for-84-suppress_redundant_updates_trigger/ Best regards, depesz -- The best thing about modern society is how easy it is to avoid contact with it. http://depesz.com/