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

More efficient query (faster) where multiple location IDs scope the ID query #667

Merged
merged 1 commit into from
Aug 15, 2024

Conversation

holmbergius
Copy link
Contributor

Where >1 location ID scopes an ID query (e.g., (enc.locationID=='place1') || enc.locationID=='place2' )), query completion time rises dramatically (e.g., 1 sec. -> 180 seconds). due to inefficient JDOQL -> SQL translation by DataNucelus. Changing to "literal" scoping produces approx. 100-1000x improvement in query execution time by reducing query complexity and leveraging in memory comparison.

Changes

  • ID query building now leverages literals for location ID

@naknomum
Copy link
Member

whoa what?? this seems like some kind of dn/sql magic. amazing.

@holmbergius holmbergius marked this pull request as ready for review August 10, 2024 17:24
@holmbergius holmbergius requested a review from naknomum August 10, 2024 17:24
@holmbergius holmbergius self-assigned this Aug 10, 2024
Copy link
Member

@naknomum naknomum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is news to me -- and baffled that it gives such a huge boost! -- but i will take it.

@holmbergius holmbergius merged commit 9ad1e75 into master Aug 15, 2024
1 check passed
@holmbergius holmbergius deleted the speed-ID-query-multi-locationID branch August 15, 2024 17:16
@TanyaStere42 TanyaStere42 added this to the 10.3.0 milestone Aug 20, 2024
Rodhlann pushed a commit to Rodhlann/Wildbook that referenced this pull request Dec 6, 2024
…locationID

More efficient query (faster) where multiple location IDs scope the ID query
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.

3 participants