fleet/changes/26178-fix-2
Jahziel Villasana-Espinoza 5e48e3d4f3
fix: add an index to mitigate vuln processing resource spikes (#26331)
> For #26178

# Checklist for submitter

## Data from testing

We tested the changes out by directly creating the index in our dogfood
env. We saw a decrease in resource usage, captured in these screenshots:

DB load (taller spike towards the left is without the index, subsequent
spikes are after the index was added)

![image
(1)](https://github.com/user-attachments/assets/141f8066-89e9-4a8e-ba7c-9fd3a09afea4)

DB load over a longer period (overnight 2025-02-12 -> 2025-02-13)

![Screenshot 2025-02-13 at 9 05
05 AM](https://github.com/user-attachments/assets/bb0c6744-537d-4aec-960b-d100c4285d00)

CPU utilization

![Screenshot 2025-02-13 at 10 25
17 AM](https://github.com/user-attachments/assets/eeea9ae5-5a10-4d50-91bc-3a806b359b39)

Memory usage

![Screenshot 2025-02-13 at 10 26
52 AM](https://github.com/user-attachments/assets/bb77cdd8-41ef-4d90-a707-70b6d2976a59)


---


If some of the following don't apply, delete the relevant line.

<!-- Note that API documentation changes are now addressed by the
product design team. -->

- [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/Committing-Changes.md#changes-files)
for more information.
- [x] Input data is properly validated, `SELECT *` is avoided, SQL
injection is prevented (using placeholders for values in statements)
- [x] If database migrations are included, checked table schema to
confirm autoupdate
- [x] A detailed QA plan exists on the associated ticket (if it isn't
there, work with the product group's QA engineer to add it)
- [x] Manual QA for all new/changed functionality
2025-02-14 12:53:41 -05:00

2 lines
No EOL
110 B
Text

- Fixed an issue with increased resource usage during vulnerabilities processing by adding a
database index.