Skip site navigation (1) Skip section navigation (2)

Re: Index on two columns not used

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: PostgreSQL Performance List <pgsql-performance(at)postgresql(dot)org>
Cc: Péter Kovács <peter(dot)kovacs(at)chemaxon(dot)hu>
Subject: Re: Index on two columns not used
Date: 2006-10-23 13:50:11
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-performance
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

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                      
The PostgreSQL Company - Command Prompt, Inc.

In response to


pgsql-performance by date

Next:From: Worky WorkersonDate: 2006-10-23 15:10:19
Subject: Re: Best COPY Performance
Previous:From: Markus SchaberDate: 2006-10-23 13:25:49
Subject: Re: Index on two columns not used

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group