Bug #29447
Filter builds taxonomy search filter inefficiently
Status:
Closed
Priority:
Normal
Assignee:
Category:
Users, Roles and Permissions
Target version:
-
Pull request:
Fixed in Releases:
Found in Releases:
Description
If a filter supports taxonomy filtering and the role has many taxonomies assigned then the resulting search query could look like
(organization_id = 1 OR organization_id = 2 OR organization_id = 3) AND (location_id = 1 or location_id = 2)
However scoped search support using the IN operator, so we could get a more compact query, something along the lines of
organization_id ^ (1,2,3) AND location_id ^ (1,2)
Related issues
Associated revisions
History
#1
Updated by The Foreman Bot 10 months ago
- Status changed from New to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/7553 added
#2
Updated by Anonymous 10 months ago
- Blocked by Refactor #29532: Update scoped_search to 4.1.8 added
#3
Updated by The Foreman Bot 9 months ago
- Fixed in Releases 2.1.0 added
#4
Updated by Tomer Brisker 9 months ago
- Category set to Users, Roles and Permissions
#5
Updated by Adam Ruzicka 9 months ago
- Status changed from Ready For Testing to Closed
Applied in changeset 72209166fa58d3c5bc2b3629d98696edf7bd7250.
#6
Updated by Ondřej Ezr 5 months ago
- Related to Bug #30797: Postgres usage spikes and disk space completely filled up, when non-admin select Monitor -> Tasks added
#7
Updated by Ondřej Ezr 4 months ago
- Related to Bug #30847: Filters needs to rebuild the taxonomy_search added
Fixes #29447 - Build more efficient taxonomy search for filters
If a filter supported taxonomy filtering and the role had many taxonomies
assigned then the resulting search query consisted of many id comparisons joined
together with ORs. This commit generates more efficient query by performing the
search as id IN (...).