Re: Schema design question as it pertains to performance - Mailing list pgsql-admin

From Kevin Grittner
Subject Re: Schema design question as it pertains to performance
Date
Msg-id 20130123002301.120590@gmx.com
Whole thread Raw
In response to Schema design question as it pertains to performance  ("Benjamin Krajmalnik" <kraj@servoyant.com>)
Responses Re: Schema design question as it pertains to performance  ("Benjamin Krajmalnik" <kraj@servoyant.com>)
List pgsql-admin
Benjamin Krajmalnik wrote:
> Kevin Grittner wrote:
>> Benjamin Krajmalnik wrote:

>>> I also assume that if no data has changed in an index, nothing
>>> is done when the record is updated as pertains to the
>>> particular index - am I correct in this assumption?
>>
>> No. [...] If any indexed column is updated, [...] it needs new
>> entries in all the indexes.

> That was my intent - if no column of an index changes in an
> update then no changes are done on the index.

I don't think you understood -- if any column referenced by any
index is updated, then all indexes must get a new entry for that
row whether or not they include that column. The new version of the
row will be at a new location, so new entries are needed in all
indexes to point to the new location.

I did *not* say that only indexes referencing the updated column
need a new entry.

-Kevin


pgsql-admin by date:

Previous
From: "Benjamin Krajmalnik"
Date:
Subject: Re: Schema design question as it pertains to performance
Next
From: "Benjamin Krajmalnik"
Date:
Subject: Re: Schema design question as it pertains to performance