[asterisk-users] AstDB/Berkely DB - Hash function? Balanced-Tree? b-Tree? Linked List?

Russell Bryant russell at digium.com
Fri Aug 15 07:12:37 CDT 2008


Karl Fife wrote:
> Does anyone know enough about the implementation of AstDB to know
> whether the data structure is a Hash function, a Balanced-Tree, a
> b-Tree, or a Linked List? 

I've never looked at the internals of db1.  However, by simply looking 
at what code is included, it looks like it is based on a b-tree.

You may have to add some debugging within db1 to see how nodes actually 
get laid out when you add your 160k entries.  The code is in main/db1-ast/.

If you're doing something this large, I would encourage you to consider 
just using a different database, and using func_odbc to access it as 
opposed to the astdb functions.

-- 
Russell Bryant
Senior Software Engineer
Open Source Team Lead
Digium, Inc.



More information about the asterisk-users mailing list