Re: Indirect indexes - Mailing list pgsql-hackers

From Claudio Freire
Subject Re: Indirect indexes
Date
Msg-id CAGTBQpZz0axwuRoNFG+1Y1gBnR_EkYzNbJoxwoWtT-a5VJttuQ@mail.gmail.com
Whole thread Raw
In response to Re: Indirect indexes  (Pavan Deolasee <pavan.deolasee@gmail.com>)
Responses Re: Indirect indexes  (Pavan Deolasee <pavan.deolasee@gmail.com>)
List pgsql-hackers
On Thu, Oct 20, 2016 at 12:30 PM, Pavan Deolasee
<pavan.deolasee@gmail.com> wrote:
>
>
> On Thu, Oct 20, 2016 at 8:44 PM, Petr Jelinek <petr@2ndquadrant.com> wrote:
>>
>>
>>
>> WARM can do WARM update 50% of time, indirect index can do HOT update
>> 100% of time (provided the column is not changed), I don't see why we
>> could not have both solutions.
>>
>
> I think the reason why I restricted WARM to one update per chain, also
> applies to indirect index. For example, if a indirect column value is
> changed from 'a' to 'b' and back to 'a', there will be two pointers from 'a'
> to the PK and AFAICS that would lead to the same duplicate scan issue.
>
> We have a design to convert WARM chains back to HOT and that will increase
> the percentage of WARM updates much beyond 50%. I was waiting for feedback
> on the basic patch before putting in more efforts, but it went unnoticed
> last CF.

With indirect indexes, since you don't need to insert a tid, you can
just "insert on conflict do nothing" on the index.



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Renaming of pg_xlog and pg_clog
Next
From: "Joshua D. Drake"
Date:
Subject: Re: Remove autovacuum GUC?