Isn't "subscribe to all state-changes like the result of a query" something you'd implement efficiently using a forward chaining inference engine, like something based on Rete?
I don't know too much about database systems, but if we were in an inference (e.g., production) system, then that would make a lot of sense! I build logical inference systems and have implemented this kind of functionality in forward, backward, and bi-directional logical inference.
So basically when a change-event comes, RxDB does not run the query against the database again, but instead uses the old results together with the event to calculate the new results.