From: Alvaro Herrera <alvherre@commandprompt.com>
To: PostgreSQL Performance List <pgsql-performance@postgresql.org>
Cc: Péter Kovács <peter.kovacs@chemaxon.hu>
Subject: Re: Index on two columns not used
Date: Mon, 23 Oct 2006 10:50:11 -0300
Message-ID: <20061023135011.GG7961@alvh.no-ip.org> (raw)
In-Reply-To: <453CC2DD.4070608@logix-tt.com>
References: <45360E25.9010403@freesurf.fr>
<45361295.9050504@enterprisedb.com>
<4539F4E1.7000003@chemaxon.hu>
<453CC2DD.4070608@logix-tt.com>
Markus Schaber wrote:
> Additionally, in most UPDATE cases, the new row version will fit into
> the same page as the old version. In this case, the index does not have
> to be changed, which is an additional speed improvement.
Actually, when the UPDATE puts a new row version in the same heap page,
the index must be updated anyway. All the rest of what you said is
correct.
There is another reason not to put visibility info in the index, which
is that it would be extremely complex to update all indexes to contain
the right visibility (and maybe impossible without risking deadlocks).
Updating only the heap is very simple.
--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: alvherre@commandprompt.com, peter.kovacs@chemaxon.hu
Subject: Re: Index on two columns not used
In-Reply-To: <20061023135011.GG7961@alvh.no-ip.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox