Re: MDAM techniques and Index Skip Scan patch - Mailing list pgsql-hackers

From Tom Lane
Subject Re: MDAM techniques and Index Skip Scan patch
Date
Msg-id 1055005.1648513314@sss.pgh.pa.us
Whole thread Raw
In response to Re: MDAM techniques and Index Skip Scan patch  (Peter Geoghegan <pg@bowt.ie>)
Responses Re: MDAM techniques and Index Skip Scan patch
List pgsql-hackers
Peter Geoghegan <pg@bowt.ie> writes:
> We could get rid of dynamic allocations for BTStackData in
> _bt_first(), perhaps. The problem is that there is no simple,
> reasonable proof of the maximum height on a B-tree, even though a
> B-Tree with more than 7 or 8 levels seems extraordinarily unlikely.

Start with a few entries preallocated, and switch to dynamically
allocated space if there turn out to be more levels than that,
perhaps?  Not sure if it's worth the trouble.

In any case, what I was on about is _bt_preprocess_keys() and
adjacent code.  I'm surprised that those aren't more expensive
than one palloc in _bt_first.  Maybe that logic falls through very
quickly in simple cases, though.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Tatsuo Ishii
Date:
Subject: Re: [HACKERS] WIP aPatch: Pgbench Serialization and deadlock errors
Next
From: Tomas Vondra
Date:
Subject: Re: POC: GROUP BY optimization