From: Tom Lane <tgl@sss.pgh.pa.us>
To: Peter Geoghegan <pg@bowt.ie>
Cc: Andres Freund <andres@anarazel.de>
Cc: Jesper Pedersen <jesper.pedersen@redhat.com>
Cc: Dmitry Dolgov <9erthalion6@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: MDAM techniques and Index Skip Scan patch
Date: Mon, 28 Mar 2022 20:21:54 -0400
Message-ID: <1055005.1648513314@sss.pgh.pa.us> (raw)
In-Reply-To: <CAH2-Wzn8sCiQ00RS2P=Vm8+B7wiq4M+8vNfKJxe0_eXMi2mSzQ@mail.gmail.com>
References: <CAH2-WzmUscvoxVkokHxP=uPTDjSi0tJkFpUPD-CeA35dvn-CMw@mail.gmail.com>
<2587523.1647982549@sss.pgh.pa.us>
<20220322230614.mn3u62zpz5fqeetm@alap3.anarazel.de>
<CAH2-Wzn8sCiQ00RS2P=Vm8+B7wiq4M+8vNfKJxe0_eXMi2mSzQ@mail.gmail.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, pg@bowt.ie, andres@anarazel.de, jesper.pedersen@redhat.com, 9erthalion6@gmail.com, pgsql-hackers@lists.postgresql.org
Subject: Re: MDAM techniques and Index Skip Scan patch
In-Reply-To: <1055005.1648513314@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox