Closed roperzh closed 1 month ago
Is this a duplicate of https://github.com/fleetdm/fleet/issues/9372?
I think I would close https://github.com/fleetdm/fleet/issues/9372 in favor of this, this is about indexes in hosts
in general 👍
@roperzh One thing I'd add as part of this ticket, is to verify our Host...ByIdentifier
queries. I'm not sure, but I think that due to the way the WHERE clause is done in those queries, it may still not be able to use the hosts.uuid
(or other) index. Maybe there's a more fancy index we could maintain to help satisfy those (widely used, I think) queries.
Hey @mna is this improvement merged? I see that we merged #18453
@georgekarrv and @lukeheath for now, I moved this story back to "Settled" because it doesn't seem to have an estimate yet.
@noahtalerman AFAIK this has not been addressed yet, no.
Hey team! Please add your planning poker estimate with Zenhub @dantecatalfamo @ghernandez345 @gillespi314 @jahzielv @mna @roperzh
hosts.uuid
lookup may be sped up by using BINARY(16)
data type for that column. For reference, see recent migration
I'm going to deprioritize this for now. It's a great update, but it's something we can revisit after our Q3 push.
QA Notes:
We will move to Ready for Release
once Load testing and Smoke tests are completed
Refined indexes bloom, Fleet's performance unburdened, Trust in system soars.
Goal
Context
Unused indexes slow down data insertion because the database must update these indexes even though they are not used, consuming additional time and processing power. This is specially critical for tables that are updated often, which is the case of the
hosts
table.But, the advantage of paying the cost of indexes is that you can access data faster.
Keeping that in mind, we have two heavy indexes that we don't use on
hosts
:And, at the same time, we desperately need to add an index on
hosts.uuid
, which is currently not indexed and used for all MDM operations.Changes
Engineering
hosts
hosts.uuid
QA
Risk assessment
Manual testing steps
Confirmation