Boost logo

Boost Users :

Subject: [Boost-users] [multiindex] Why not to add B+Tree index to multiIndex?
From: fgmailbox (fgmailbox_at_[hidden])
Date: 2008-11-20 22:59:30



·¢¼þÈË£º fgmailbox
·¢ËÍʱ¼ä£º 2008-11-21 11:41:59
ÊÕ¼þÈË£º 49259BE6.8010704; joaquin
Ö÷Ì⣺ Re: [Boost-users] [multiindex] Why not to add B+Tree index to multiIndex?

To: "boost-users_at_[hidden]" <boost-users_at_[hidden]>
Message-ID: <49259BE6.8010704_at_[hidden]>
Content-Type: text/plain; charset=GB2312
fgmailbox escribi??:
> we can use multiindex as a memory db,but the multiindex only support
> hash index and Order index(RB TREE),why not to add b+ Tree Index to
> multiindex to make it much faster .

I'm no expert in B+ trees, but I understand that these structures are
more effective than regular binary trees when secondary storage (i.e.
hard disk) is used, which is not the case for an in-memory container
like multi_index_container. Have you any reference on the performance
of B+ trees in in-memory scenarios?
Joaqu??n M L??pez Mun~oz
Telef??nica, Investigaci??n y Desarrollo

Hi joaquin:

I found b+ Tree code in a GNU Database Source Code of [firebird] Database code
BePlusTree< > template class In [tree.h],your can find this source code in

< typename Value, typename Key = Value, typename Allocator = MallocAllocator,
 typename KeyOfValue = DefaultKeyValue<Value>,
 typename Cmp = DefaultComparator<Key>,
 int LeafCount = LEAF_PAGE_SIZE / sizeof(Value),
 nt NodeCount = NODE_PAGE_SIZE / sizeof(void*)
class BePlusTree {....}

the Allocator can be a memory allocator or a disk file allocator,so this template can use as a memory database index

,and I have use the template to test BePlusTree and stl::set to test performance, the BePlusTree is faster than set in the condition of large scale data query.



Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at