Optimize software/versions queries. (#35670)#36354
Merged
getvictor merged 1 commit intorc-minor-fleet-v4.77.0from Nov 26, 2025
Merged
Optimize software/versions queries. (#35670)#36354getvictor merged 1 commit intorc-minor-fleet-v4.77.0from
getvictor merged 1 commit intorc-minor-fleet-v4.77.0from
Conversation
<!-- Add the related story/sub-task/bug number, like Resolves #123, or remove if NA --> **Related issue:** Resolves #34677 and Resolves #35349 Loadtest results: ```text Description Average Worst Results ----------- ------- ----- ------- Page 0, DESC order 441ms 506ms 20 items Page 0, ASC order 1.099s 1.8s 20 items Page 1000, DESC order 484ms 641ms 20 items 100 per_page 426ms 450ms 100 items With CVE scores 467ms 630ms 20 items Order by name, page 0 7.589s 7.812s 20 items Order by name, page 1000 9.103s 9.656s 20 items Vulnerable only 6.098s 6.34s 20 items Search 'chrome' 14.305s 14.868s 20 items Known exploit filter 20.253s 21.238s 20 items Min CVSS score 7.0 33.743s 35.169s 20 items Max CVSS score 8.0 39.825s 41.83s 20 items CVSS range 7.0-9.0 42.556s 43.267s 20 items ``` Follow-up issue: #35799 # Checklist for submitter - [x] Changes file added for user-visible changes in `changes/`, `orbit/changes/` or `ee/fleetd-chrome/changes`. See [Changes files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/guides/committing-changes.md#changes-files) for more information. ## Testing - [x] Added/updated automated tests - [x] Where appropriate, [automated tests simulate multiple hosts and test for host isolation](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/reference/patterns-backend.md#unit-testing) (updates to one hosts's records do not affect another) - [x] QA'd all new/changed functionality manually ## Database migrations - [x] Checked schema for all modified table for columns that will auto-update timestamps during migration. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Refactor** * Improved software listing and counting performance via database index and query optimizations, resulting in faster retrieval and reduced load times for software lists across team and global views. * **Chores** * Added a migration to apply the index changes and updated migration tracking. <!-- end of auto-generated comment: release notes by coderabbit.ai --> (cherry picked from commit 3724166)
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## rc-minor-fleet-v4.77.0 #36354 +/- ##
=========================================================
Coverage ? 66.16%
=========================================================
Files ? 2088
Lines ? 177827
Branches ? 7372
=========================================================
Hits ? 117664
Misses ? 49332
Partials ? 10831
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
cdcme
approved these changes
Nov 26, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related issue: Resolves #34677 and Resolves #35349
Loadtest results:
Follow-up issue: #35799
Checklist for submitter
changes/,orbit/changes/oree/fleetd-chrome/changes.See Changes
files for more information.
Testing
Added/updated automated tests
Where appropriate, automated tests simulate multiple hosts and test for host
isolation (updates to one hosts's records do not affect another)
QA'd all new/changed functionality manually
Database migrations
Summary by CodeRabbit
(cherry picked from commit 3724166)