From: Niklas Holsti <niklas.holsti@tidorum.invalid>
Subject: Re: B-tree performance
Date: Sun, 01 Sep 2013 07:57:00 +0300
Date: 2013-09-01T07:57:00+03:00 [thread overview]
Message-ID: <b8fvorFdlvfU1@mid.individual.net> (raw)
In-Reply-To: <9fc26b8a-7a5c-4941-81cb-8f0e9c17a660@googlegroups.com>
On 13-08-31 10:14 , Peter Brooks wrote:
> I'm interested to know if anybody has any real-world evidence for
> this hypothesis, or if they agree with my gut feel.
>
> If I build a B-tree, then the conventional means to search it would
> be to start in the middle, then cascade left and right following the
> pointer structure. That's slow because most searches won't turn up a
> value in the first N levels of the b-tree.
I find your question hard to understand. Are you really talking about
B-trees (http://en.wikipedia.org/wiki/B-tree), with fan-out typically
much larger than 2? Or are you talking about binary trees with 2-way
fan-out? Your phrase "left and right" suggests the latter.
> So it'd make sense to have an array which contains the address values
> of the B-tree down to a certain level. That way, for a look up, you
> search the array, which is nice and quick, and this leads you to the
> correct sub-tree and you then continue as usual, from the top of that
> sub-tree.
If you really mean B-trees, it seems to me that you could just increase
the fan-out of the B-tree to get the same effect. With a fan-out of say
4000, the root of the B-tree consists of a sorted array of 4000 (or
3999) key values, which is nice and quick to search.
--
Niklas Holsti
Tidorum Ltd
niklas holsti tidorum fi
. @ .
next prev parent reply other threads:[~2013-09-01 4:57 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-31 7:14 B-tree performance Peter Brooks
2013-08-31 15:26 ` Shark8
2013-08-31 15:47 ` Peter Brooks
2013-09-01 4:57 ` Niklas Holsti [this message]
2013-09-01 6:05 ` Peter Brooks
2013-09-01 8:05 ` Niklas Holsti
2013-09-01 8:38 ` Peter Brooks
2013-09-02 4:28 ` Niklas Holsti
2013-09-03 2:15 ` Peter Brooks
2013-09-05 8:25 ` Memory mapping and network file systems (Was: B-tree performance) Jacob Sparre Andersen
2013-09-05 10:12 ` Peter Brooks
2013-09-03 16:14 ` B-tree performance Dan'l Miller
2013-09-03 17:43 ` Peter Brooks
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox