@Test
    void testGetVsCursorPerformance() {

//        final int iterations = 100_000;
//        final int iterations = 1_000_000;
//        final int iterations = 10_000_000;
        final int iterations = 10;

        LOGGER.info("info {}", basicLmdbDb3.getDbInfo());

        // Ensure entries come back in the right order
        final List<Tuple2<Integer, String>> ascendingData = IntStream
                .range(0, iterations)
                .boxed()
                .map(i -> Tuple.of(i, String.format("Val %010d", i)))
                .collect(Collectors.toList());

        assertThat(ascendingData)
                .hasSize(iterations);

        LOGGER.logDurationIfInfoEnabled(() -> {
            lmdbEnv.doWithWriteTxn(writeTxn -> {
                ascendingData.forEach(tuple -> {
                    basicLmdbDb3.put(writeTxn, tuple._1(), tuple._2(), false);
                });
            });
        }, "Ascending puts");

        if (iterations < 50) {
            basicLmdbDb3.logDatabaseContents(LOGGER::info);
            basicLmdbDb3.logRawDatabaseContents(LOGGER::info);
        }

        LOGGER.info("entry count: " + basicLmdbDb3.getEntryCount());

        final int runCount = 3;
        // Do it a few times so the jvm can warm up
        for (int i = 0; i < runCount; i++) {
            LOGGER.logDurationIfInfoEnabled(() -> {
                lmdbEnv.doWithReadTxn(writeTxn -> {
                    ascendingData.forEach(tuple -> {
                        final Integer key = tuple._1();
                        final String val = basicLmdbDb3.get(writeTxn, key)
                                .orElseThrow(() ->
                                        new RuntimeException("No value for key " + key));
                        assertThat(val)
                                .isEqualTo(tuple._2());
                    });
                });
            }, "Gets");
        }

        for (int i = 0; i < runCount; i++) {
            LOGGER.logDurationIfInfoEnabled(() -> {
                lmdbEnv.doWithReadTxn(readTxn -> {
                    ascendingData.forEach(tuple -> {
                        final Integer key = tuple._1();

                        try (final PooledByteBuffer startKeyBuf = basicLmdbDb3.getPooledKeyBuffer();
                                final PooledByteBuffer endKeyBuf = basicLmdbDb3.getPooledKeyBuffer()) {

                            basicLmdbDb3.serializeKey(startKeyBuf.getByteBuffer(), key);
                            basicLmdbDb3.serializeKey(endKeyBuf.getByteBuffer(), key);

                            final KeyRange<ByteBuffer> keyRange = KeyRange.closed(
                                    startKeyBuf.getByteBuffer(),
                                    endKeyBuf.getByteBuffer());

                            try (final CursorIterable<ByteBuffer> cursorIterable = basicLmdbDb3.iterate(
                                    readTxn, keyRange)) {

                                final Iterator<KeyVal<ByteBuffer>> iterator = cursorIterable.iterator();
                                String val = null;
                                if (iterator.hasNext()) {
                                    val = basicLmdbDb3.deserializeValue(iterator.next().val());
                                } else {
                                    fail(LogUtil.message("Key {} not found", key));
                                }

                                assertThat(val)
                                        .isEqualTo(tuple._2());
                            }
                        }
                    });
                });
            }, "Cursor gets");
        }
    }
Intended for manual running at high iteration count to test lookup difference
stroom-lmdb/src/test/java/stroom/lmdb/TestBasicLmdbDb.java