Well, there really is nothing faster than BerkeleyDB for doing key lookups on data that's too big to fit in RAM. Depending on your experience, you might be satisfied with just using a local MySQL. If you try MySQL, make sure you connect to it as localhost. It makes a difference in performance.
And use MyISAM instead of InnoDB or another option (I think there are more now?). It doesn't support foreign key and atomicity stuff but unless something has changed in the last couple years it's still the fastest relational DB and it can be tuned to your specific data if you know how.