[query] Ensure optimal planning of unique-identity (and unique-value) attributes #144

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

Unique attributes, perhaps obviously, can produce no more than a single result each time they're evaluated, if their value place is bound.

As such, if the value place is bound — or we expect it to be, given hints from the input bindings — then we should consider handling that tuple first. If it yields no results, the query immediately short-circuits. If it yields a result, the rest of the query can proceed, probably with one less unbound place.

Note that we might need extra work to make sure that the vaet/avet index is used: #332.

Unique attributes, perhaps obviously, can produce no more than a single result each time they're evaluated, if their value place is bound. As such, if the value place _is_ bound — or we expect it to be, given hints from the input bindings — then we should consider handling that tuple first. If it yields no results, the query immediately short-circuits. If it yields a result, the rest of the query can proceed, probably with one less unbound place. Note that we might need extra work to make sure that the `vaet`/`avet` index is used: #332.
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#144
No description provided.