Also note that this is single thread retrieval on a 10yo machine. I'd expect these times to get cut in half by just modern hardware. Then of course we can just apply c++20 vectorization to blocks, processing txs on independent threads. I just haven't bothered to write the queries for this yet. We do use this technique in one of the confirmation queries, as confirmation runs on a single thread, but can be vectorized within a block. It's as simple as this:
std::transform(parallel, txs.begin(), txs.end(), block.begin(), to_block);
(edited)