[query] Field retrieval optimization #158
Labels
No labels
A-build
A-cli
A-core
A-design
A-edn
A-ffi
A-query
A-sdk
A-sdk-android
A-sdk-ios
A-sync
A-transact
A-views
A-vocab
P-Android
P-desktop
P-iOS
bug
correctness
dependencies
dev-ergonomics
discussion
documentation
duplicate
enhancement
enquiry
good first bug
good first issue
help wanted
hygiene
in progress
invalid
question
ready
size
speed
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: greg/mentat#158
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Consider a query like
In other words: find bindings for
?page
, then retrieve some values for that binding.We currently produce the following SQL:
If
:page/url
and:page/description
are unique, or — as in this case — we're returning a single tuple, we could instead produce two subqueries to represent the values, and filter out nulls:(obviously eliminating the interior
LIMIT
for unique attributes).I'm not sure if there's a speed win there, but it would be interesting to see if alternative representations of individual patterns could yield better queries.