[query] Intern query arguments #159

Open
opened 2020-08-06 16:55:56 +00:00 by gburd · 0 comments
gburd commented 2020-08-06 16:55:56 +00:00 (Migrated from github.com)

Right now we'll happily generate multiple SQL arguments for a query like

[:find ?y ?x :where
 [?x :foo/bar "Thing"]
 [?y :foo/bar "Thing"]]

We should consider interning (giving us a smaller memory footprint) and using shared Rcs when collecting arguments or — better — recognizing duplicate values during query translation and spitting out the same named SQLite argument place ($v0) for both of those.

Right now we'll happily generate multiple SQL arguments for a query like ``` [:find ?y ?x :where [?x :foo/bar "Thing"] [?y :foo/bar "Thing"]] ``` We should consider interning (giving us a smaller memory footprint) and using shared `Rc`s when collecting arguments or — better — recognizing duplicate values during query translation and spitting out the same named SQLite argument place (`$v0`) for both of those.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: greg/mentat#159
No description provided.