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

Fixed issue in attribute Expression Helper that caused unnecessary index scans #5576

Conversation

Jon-Corey
Copy link
Contributor

@Jon-Corey Jon-Corey commented Sep 6, 2023

Proposed Changes

Fixes an issue introduced in 4c5eef5 where dataview attribute filters are scanning an entire Attribute Value index instead of just seeking to the applicable rows. Scanning entire indexes causes a major hit to performance and is entirely unnecessary in this situation.

This fix simply reverts the changes to the ExpressionHelper that was made in 4c5eef5 .

With this fix, dataviews that were taking ~4 seconds to complete in v14, and then ~5 minutes to complete in v15 are now back to taking ~4 seconds to complete.

Fixes: #5575

Types of changes

What types of changes does your code introduce to Rock?
Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality, which has been approved by the core team)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

  • This is a single-commit PR. (If not, please squash your commit and re-submit it.)
  • I verified my PR does not include whitespace/formatting changes -- because if it does it will be closed without merging.
  • I have read the Contributing to Rock doc
  • By contributing code, I agree to license my contribution under the Rock Community License Agreement
  • Unit tests pass locally with my changes
  • I have added any required unit tests or integration tests that prove my fix is effective or that my feature works
  • I have included updated language for the Rock Documentation (if appropriate)

Further comments

Documentation

Migrations

If your pull request requires a migration, please exclude the migration from the Rock.Migration project, but submit it with your pull request. Please add a note to your pull request that provides a heads up that a migration file is present.

MrUpsideDown pushed a commit that referenced this pull request Sep 12, 2023
@MrUpsideDown
Copy link
Collaborator

@Jon-Corey - thanks for your work in identifying this issue and submitting the PR. This was important enough to fix in hotfix release 1.15.2, so I have cherry-picked your commit into that branch rather than merge this PR to the develop branch directly. The original change which caused this issue was added to address a performance issue we found in another environment, so I also added a code comment to prevent this same mistake from happening again. I've preserved your name as the author of the commit, and have added this to your Spark PR Count. Thanks again for taking the time to work through this, much appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dataview Attribute Value Filter Causing Index Scans (Terrible Dataview Performance)
2 participants