chapter316, [SORA][BlockChain] Is LevelDB really fast to Blockchain?

We are currently checking performance of the blockchain that has migrated from LevelDB to SQLite.

In the case of LevelDB, in order to retrieve data using the sorted records arranged in a tree structure, it is necessary to deserialize unnecessary key data in order to apply conditions for exiting the search.

For example, if blockchain has 500,000 blocks, the key will be deserialized 500,000 times.
Then, since memcpy is called several times internally, it is a heavy process.
Furthermore, it will be strcmp in the comparison process. It’s heavy.

On the other hand, in the case of SQLite, the key can be specified in advance by the condition, so they only need to get the value.