As far as I know, blockchains do not provide a way to efficiently retrieve data. For example, if I'm looking for txs with a desired property (e.g. it has an output to a particular address), I simply have to traverse over each block and each tx in those blocks and fetch the matching txs.
However, Multichain seems to be providing a way to do the above task efficiently with streams if I understand correctly.How does it do that?
Here it says it indexes data like regular DBs. Where do these indexes stored? Are they stored off-chain, in local memory?
In general, how do streams achieve efficient retrieval of data?