3 ms·
What is the purpose of storing the messages in the Merkle trie that is stored in the database along with each individual message. It seems to me that the trie h
by IgorPartola 6y ago
What is the purpose of storing the messages in the Merkle trie that is stored in the database along with each individual message. It seems to me that the trie here is the bottleneck, not Postgres. And am I reading it correctly that the entire trie is stored as a single blob and has to be modified and written back in its entirety? The whole architecture seems suspect and like its performance is going to be terrible.
And yes multiple insert statements are better than individual ones and yes getting the IDs back is good. Different RDBMSs will handle this differently but batching means higher throughput at the cost of some latency which is often a worthwhile tradeoff.