Re: GiST penalty functions [PoC] - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: GiST penalty functions [PoC]
Date
Msg-id 0657d774-fa67-5c3c-17d7-22b5a0ac0b4b@iki.fi
Whole thread Raw
In response to Re: GiST penalty functions [PoC]  (Andrew Borodin <borodin@octonica.com>)
Responses Re: GiST penalty functions [PoC]  (Andrew Borodin <borodin@octonica.com>)
List pgsql-hackers
On 09/07/2016 09:42 AM, Andrew Borodin wrote:
> 2. Your algorithm, among loosing some bits of precision (which is
> absolutely acceptable - we have like 31 of them and that’s a lot) rely on
> false assumption. We compare tuples on page not by MBR of inserted tuple,
> but by MBR of tuple on page, which is different for every penalty
> calculation.

The penalty function has two arguments: the new tuple, and the existing 
tuple on the page. When we're inserting, it gets called for every 
existing tuple on the page, with the same new tuple. And then we compare 
the returned penalties. So for a single insertion, the "new tuple" 
argument stays the same for every call.

- Heikki




pgsql-hackers by date:

Previous
From: Kyotaro HORIGUCHI
Date:
Subject: Illegal SJIS mapping
Next
From: Andrew Borodin
Date:
Subject: Re: GiST penalty functions [PoC]