Re: GiST penalty functions [PoC]

From: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
To: amborodin(at)acm(dot)org
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru>, Михаил Бахтерев <mike(dot)bakhterev(at)gmail(dot)com>
Subject: Re: GiST penalty functions [PoC]
Date: 2016-09-07 06:51:56
Message-ID: 0657d774-fa67-5c3c-17d7-22b5a0ac0b4b@iki.fi
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Borodin 2016-09-07 07:06:52 Re: GiST penalty functions [PoC]
Previous Message Kyotaro HORIGUCHI 2016-09-07 06:50:50 Illegal SJIS mapping