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

Whole-system search using _id parameter performs poorly #2629

Closed
michaelwschroeder opened this issue Jul 21, 2021 · 1 comment
Closed

Whole-system search using _id parameter performs poorly #2629

michaelwschroeder opened this issue Jul 21, 2021 · 1 comment
Assignees
Labels
bug Something isn't working performance performance search

Comments

@michaelwschroeder
Copy link
Contributor

Describe the bug
Whole-system search using the _id search parameter performs poorly. The generated SQL contains a clause to check against the logical_resources.logical_id column, but no corresponding clause to check against the logical_resources.resource_type_id column, so a table scan is done rather than using an index.

Environment
4.8.3

To Reproduce
Steps to reproduce the behavior:

  1. Run the following query against a DB with a large number of resources: .../v4?_id=xxx

Expected behavior
This query should run in less than a second.

Additional context
Add any other context about the problem here.

@michaelwschroeder michaelwschroeder added bug Something isn't working search performance performance labels Jul 21, 2021
@michaelwschroeder michaelwschroeder self-assigned this Jul 21, 2021
michaelwschroeder added a commit that referenced this issue Jul 22, 2021
Issue #2629 - fix performance issue with whole-system _id search
@d0roppe
Copy link
Collaborator

d0roppe commented Jul 28, 2021

Verified this is a lot faster with this fix. closing issue.

@d0roppe d0roppe closed this as completed Jul 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working performance performance search
Projects
None yet
Development

No branches or pull requests

2 participants