Re: GIN improvements part2: fast scan

From: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>
To: Alexander Korotkov <aekorotkov(at)gmail(dot)com>
Cc: Tomas Vondra <tv(at)fuzzy(dot)cz>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: GIN improvements part2: fast scan
Date: 2014-03-12 18:13:45
Message-ID: 5320A3D9.1010007@vmware.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 03/12/2014 07:42 PM, Alexander Korotkov wrote:
> Preparation we do in startScanKey requires knowledge of estimate size of
> posting lists/trees. We do this estimate by traversal to leaf pages. I
> think gincostestimate is expected to be way more cheap. So, we probably
> need so more rough estimate there, don't we?

Yeah, maybe. We do something similar for b-tree MIN/MAX currently, but
with a lot of keys, it could be a lot more expensive to traverse down to
all of them.

I wonder if we could easily at least catch the common skewed cases,
where e.g the logic of the consistent function is to AND all the keys.
The opclass would know that, but we would somehow need to pass down the
information to gincostestimate.

- Heikki

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2014-03-12 18:21:19 Re: db_user_namespace a "temporary measure"
Previous Message Josh Berkus 2014-03-12 18:09:48 Re: db_user_namespace a "temporary measure"