2008-11-21

fgmailbox

发件人: 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@lists.boost.org" <boost-users@lists.boost.org>
Message-ID: <49259BE6.8010704@tid.es>
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 http://sourceforge.net
 
template 
<    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.
 
2008-11-21

fgmailbox