-
-
Notifications
You must be signed in to change notification settings - Fork 311
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Query: shortcircuit clause resolution when result is guaranteed to be…
… empty. The `-collect` fn, run at the end of a query, correctly shortcircuits with the following comment: "one empty rel means final set has to be empty" However, while processing the query clauses, there was no shortcircuit. Also, since the implementation of `lookup-pattern` is agnostic to existing rels, this means that attempts to write short-circuiting clauses at the top of a complex query have very little effect: the query engine will continue querying the indexes for every tuple that could possibly match every clause. This adds a shortcircuit in `resolve-clause` if any existing relation is empty. The check is cheap, and it should provide a substantial performance boost in many common cases.
- Loading branch information
Showing
2 changed files
with
24 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters