qpdb / mentat

A persistent, relational store inspired by Datomic and DataScript.
https://mentat.rs/
Apache License 2.0
52 stars 2 forks source link

Optimize queries involving `(tx-ids)` and `(tx-data)` #219

Open gburd opened 4 years ago

gburd commented 4 years ago

640 implements the tx-* log API, and one of the tests uses both (tx-ids) and (tx-data). This leads to two walks of the transactions table, which could be coalesced into one walk. This is a specific case of a more general optimization pattern where-by known combinations of functions and binding forms can be transformed.