Deployments and config-audit free-text search scan the table (leading-wildcard LIKE) #50

Open
opened 2026-11-06 15:24:37 -05:00 by dohertj2 · 0 comments
Owner

Register row 36 (deferred-work register).

Four LIKE '%term%' predicates in DeploymentManagerRepository (instance name, deployment id, revision hash, user) preclude index seeks; BuildListQuery is shared with GetDeploymentStatusCountsAsync, so one search = two scans. Anchoring was rejected as a contract change (DeploymentListFilter.Search promises substring matching). The config-audit viewer filters on AuditLogEntries have the same shape. ListInstances was fixed to prefix search in baab6ac7.

Revisit trigger (from register): Search latency complaints on the Deployments page or the config audit log.

Current state: Acceptable at purge-bounded row counts; still a scan.
Fix options: renegotiate to prefix on the id/hash legs, or full-text.

Source: docs/plans/2026-07-08-deferred-work-register.md row 36

Register row 36 (deferred-work register). Four `LIKE '%term%'` predicates in `DeploymentManagerRepository` (instance name, deployment id, revision hash, user) preclude index seeks; `BuildListQuery` is shared with `GetDeploymentStatusCountsAsync`, so one search = two scans. Anchoring was rejected as a contract change (`DeploymentListFilter.Search` promises substring matching). The config-audit viewer filters on `AuditLogEntries` have the same shape. `ListInstances` was fixed to prefix search in `baab6ac7`. **Revisit trigger (from register):** Search latency complaints on the Deployments page or the config audit log. **Current state:** Acceptable at purge-bounded row counts; still a scan. Fix options: renegotiate to prefix on the id/hash legs, or full-text. Source: `docs/plans/2026-07-08-deferred-work-register.md` row 36
dohertj2 added the type:debtpriority:p3migrated labels 2026-11-06 15:24:37 -05:00
Sign in to join this conversation.