Open area363 opened 3 years ago
This draft is now ready for review.
Major updates are:
1) Data is now stored in VARCHAR
or BIGINT
to enable bulk loading
to increase insertion speed that matches RocksDB.
2) Block
table is added to increase query time for ListBlocks().
Feedback needed:
1) MySql query for ListBlocks() is quite redundant but nullable limit
and miner
parameters make it pretty tricky to write clean, efficient code. I'd appreciate anyone's feedback on this.
As Libplanet Explorer became placed in the Libplanet monorepo (see also: planetarium/libplanet#1244), this pull request should be sent to the Libplanet monorepo instead.
This PR enriches
MySqlRichStore
to storeblock
andtransaction
data.In this section, I’m using MySqlBulkLoader to store
updated_address
data in the tx.Genesis block
has around 50,000 records ofupdated_addresses
. And so, storing these entries during preloading took around 5 minutes with the original implementation. With bulk loading, the time has decreased to about 5 seconds. However, I’ve been running into some issues bulk loading byte arrays into the table. When I just useaddr.ToByteArray()
here, the data is converted to a string. I’m wondering if there are other ways to bulk load byte array data. 🤔