If a node is subscribed to a stream, it indexes stream items in around 10 different ways, to enable rapid retrieval using all the different APIs, with global or local ordering. Each of these indexes uses its own type of key, and the index entry indeed points to the txid.