Re: strange index performance? - Mailing list pgsql-performance

From Kenneth Marshall
Subject Re: strange index performance?
Date
Msg-id 20090126153709.GV1961@it.is.rice.edu
Whole thread Raw
In response to Re: strange index performance?  (Thomas Finneid <tfinneid@fcon.no>)
List pgsql-performance
On Mon, Jan 26, 2009 at 03:49:00PM +0100, Thomas Finneid wrote:
> Kenneth Marshall wrote:
>> It may be that the smaller index has update contention for the same
>> blocks that the larger index does not.
>
> Is that an assumption based on both indexes existing? if so I might agree,
> but if you are talking about only one index existing at a time then could
> you explain what the basis for you conclusion is?
>
> regards
>
> thomas
>

The small index blocks would look like:

|abcd|efgh|ijkl|...

and the large index:

|axxx|...|bxxx|...|cxxx|... and so on.

Now, if you try to update a-k, the small index will be trying to
update and possibly rearrange/split/... items on the same disk
blocks while the larger index would be updating without contention.
It may not even be block level contention, the same argument applies
to cachelines with in a block.

Cheers,
Ken

pgsql-performance by date:

Previous
From: Thomas Finneid
Date:
Subject: Re: strange index performance?
Next
From: "M. Edward (Ed) Borasky"
Date:
Subject: Re: postgresql 8.3 tps rate