Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize remaining filter evaluation #7433

Closed
wants to merge 1 commit into from

Conversation

Yuhta
Copy link
Contributor

@Yuhta Yuhta commented Nov 6, 2023

Summary:
Currently when we have a remaining filter separated by ANDs and same field is multi-referenced from different clauses, we eagerly materialize that field. If there is a very selective condition in the AND clauses, we lose the opportunity to avoid reading unneeded rows using that condition on the mutli-referenced field.

Since AND always reduces the selectivity, there is no need to eagerly evaluate the multi-referenced fields. It gives 2.6x performance gain in some queries by evaluating the field lazily.

Differential Revision: D51039406

Copy link

netlify bot commented Nov 6, 2023

Deploy Preview for meta-velox canceled.

Name Link
🔨 Latest commit 1c0742a
🔍 Latest deploy log https://app.netlify.com/sites/meta-velox/deploys/65498a21f6a12100087c2100

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Nov 6, 2023
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D51039406

@Yuhta Yuhta linked an issue Nov 6, 2023 that may be closed by this pull request
Yuhta added a commit to Yuhta/velox that referenced this pull request Nov 6, 2023
Summary:

Currently when we have a remaining filter separated by ANDs and same field is multi-referenced from different clauses, we eagerly materialize that field.  If there is a very selective condition in the AND clauses, we lose the opportunity to avoid reading unneeded rows using that condition on the mutli-referenced field.

Since AND always reduces the selectivity, there is no need to eagerly evaluate the multi-referenced fields.  It gives 2.6x performance gain in some queries by evaluating the field lazily.

Differential Revision: D51039406
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D51039406

Yuhta added a commit to Yuhta/velox that referenced this pull request Nov 6, 2023
Summary:

Currently when we have a remaining filter separated by ANDs and same field is multi-referenced from different clauses, we eagerly materialize that field.  If there is a very selective condition in the AND clauses, we lose the opportunity to avoid reading unneeded rows using that condition on the mutli-referenced field.

Since AND always reduces the selectivity, there is no need to eagerly evaluate the multi-referenced fields.  It gives 2.6x performance gain in some queries by evaluating the field lazily.

Differential Revision: D51039406
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D51039406

Yuhta added a commit to Yuhta/velox that referenced this pull request Nov 6, 2023
Summary:

Currently when we have a remaining filter separated by ANDs and same field is multi-referenced from different clauses, we eagerly materialize that field.  If there is a very selective condition in the AND clauses, we lose the opportunity to avoid reading unneeded rows using that condition on the mutli-referenced field.

Since AND always reduces the selectivity, there is no need to eagerly evaluate the multi-referenced fields.  It gives 2.6x performance gain in some queries by evaluating the field lazily.

Reviewed By: laithsakka

Differential Revision: D51039406
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D51039406

Yuhta added a commit to Yuhta/velox that referenced this pull request Nov 6, 2023
Summary:

Currently when we have a remaining filter separated by ANDs and same field is multi-referenced from different clauses, we eagerly materialize that field.  If there is a very selective condition in the AND clauses, we lose the opportunity to avoid reading unneeded rows using that condition on the mutli-referenced field.

Since AND always reduces the selectivity, there is no need to eagerly evaluate the multi-referenced fields.  It gives 2.6x performance gain in some queries by evaluating the field lazily.

Reviewed By: laithsakka

Differential Revision: D51039406
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D51039406

Summary:

Currently when we have a remaining filter separated by ANDs and same field is multi-referenced from different clauses, we eagerly materialize that field.  If there is a very selective condition in the AND clauses, we lose the opportunity to avoid reading unneeded rows using that condition on the mutli-referenced field.

Since AND always reduces the selectivity, there is no need to eagerly evaluate the multi-referenced fields.  It gives 2.6x performance gain in some queries by evaluating the field lazily.

Reviewed By: laithsakka

Differential Revision: D51039406
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D51039406

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in fc8a69f.

Copy link

Conbench analyzed the 1 benchmark run on commit fc8a69f1.

There were no benchmark performance regressions. 🎉

The full Conbench report has more details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Different results at idx '99': 'false' vs. 'null'
2 participants