in reply to BerkeleyDB and large datasets

I had a similar problem some time ago. My bottleneck was not having enough RAM. You can check this by using the top utility while your program is running: if your process is swapping you will see a "D" instead of "R" in the process status, and the CPU use will be very low.