dbTalk Databases Forums  

cursor traverse order of hash based database

comp.databases.berkeley-db comp.databases.berkeley-db


Discuss cursor traverse order of hash based database in the comp.databases.berkeley-db forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
AT
 
Posts: n/a

Default cursor traverse order of hash based database - 07-10-2006 , 07:32 PM






Hi, I am trying to read key/data pairs within a range of buckets from
hash based berkeley db. I would like to avoid creating a secondary
index of bucket number for this purpose if possible.

Is there a fixed order of the cursor traverser in hash db (considering
the linear hash of bdb can be extented ) ?

If I use DBcursor->c_get() with DB_NEXT_NODUP and finish reading all
key/data paires in current bucket, will the cursor move to record in
next bucket (current bucket+1 or greater) of the hash db ? or it will
just pick a page that's physically next to current page ?

I think the cursor traverse order is obvious for b-tree based db. But
for hash bashed db,
I can't find a answer from
http://www.sleepycat.com/docs/api_c/dbc_get.html

Any suggestion will be appreciated. Thanks.


Reply With Quote
  #2  
Old   
AT
 
Posts: n/a

Default Re: cursor traverse order of hash based database - 08-01-2006 , 10:03 AM






Hi,

I'm not sure at what are you referring when you are saying "physically
next"? At the way in which the operating system is reading the db from
the disk?

How does your data/keys pairs look like?

When you are retrieving data with DB_NEXT_NODUP, after the cursor will
finish to read all the key/data paires from the current bucket, the
cursor will move the the next bucket of the hash database.

Also, the same thing is valid for filling in records in the database.
If the estimate or fill factor are not set or are set too low, hash
tables will still expand gracefully as keys are entered, although a
slight performance degradation may be noticed.

Related documentation can be found here:
http://www.sleepycat.com/docs/ref/am_conf/h_hash.html
http://www.sleepycat.com/docs/api_c/db_set_h_nelem.html

Regards,
Bogdan Coman, Oracle


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.