Updated containsKey to only get the key not the data; deData.setPartial(0, 0, true); as described in http://www.oracle.com/technetwork/database/berkeleydb/je-faq-096044.html#CanIperformanefficientkeysonlyquery