dbTalk Databases Forums  

bulk write method to quickly generate large db files?

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


Discuss bulk write method to quickly generate large db files? in the comp.databases.berkeley-db forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
odigity@gmail.com
 
Posts: n/a

Default bulk write method to quickly generate large db files? - 12-15-2006 , 05:09 PM






I wanted to benchmark read access to a very large BerkeleyDB file for
an application I'm building (40 million documents of about 500 bytes
each). I figured the first step is to generate a file of appropriate
size, so I wrote a script that loops from 1 to 40m and inserts a record
where key = loop number and value is a string literal of about 500
bytes.

The problem is it's taking forever, which in retrospect I should have
expected. Writes take a long time, especially writes that are not
simple appends, like with a flat file.

I've searched through the BerkeleyDB docs and the web, but haven't
found any discussion of a method to bulk write to a BerkeleyDB file.
Does anyone know of one?

Alternatively, I could set up a huge RAM disk, create/populate the file
there, and then copy it to disk when done, but that requires more work
to set up, plus root access, and it won't scale beyond a few gigs (no
supercomputers in-house).

-ofer


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.