MemDB currently uses a Go map for storage, which means all ordered operations (such as range scans) are extremely slow - see e.g. tendermint/tendermint#4520.
By using an ordered data structure instead, e.g. a B-tree, these operations would be significantly faster.