more optimizations to Mdbdb