Skip to content

perf: cap count queries, use native UUID ops for audit/conn logs (backport #23835)#24116

Merged
f0ssel merged 3 commits intorelease/2.29from
george/r229/backport-plat-31-connection-and-audit-logs-page-timeouts
Apr 9, 2026
Merged

perf: cap count queries, use native UUID ops for audit/conn logs (backport #23835)#24116
f0ssel merged 3 commits intorelease/2.29from
george/r229/backport-plat-31-connection-and-audit-logs-page-timeouts

Conversation

@geokat
Copy link
Copy Markdown
Contributor

@geokat geokat commented Apr 7, 2026

Backport of #23835.

Audit and connection log pages were timing out due to expensive COUNT(*) queries over large tables. This commit adds opt-in count capping: requests can return a count_cap field signaling that the count was truncated at a threshold, avoiding full table scans that caused page timeouts.

Text-cast UUID comparisons in regosql-generated authorization queries also contributed to the slowdown by preventing index usage for connection and audit log queries. These now emit native UUID operators.

Frontend changes handle the capped state in usePaginatedQuery and PaginationWidget, optionally displaying a capped count in the pagination UI (e.g. "Showing 2,076 to 2,100 of 2,000+ logs")


Cherry picked from 86ca61d

…kport #23835)

Backport of #23835.

Audit and connection log pages were timing out due to expensive COUNT(*)
queries over large tables. This commit adds opt-in count capping: requests can
return a `count_cap` field signaling that the count was truncated at a threshold,
avoiding full table scans that caused page timeouts.

Text-cast UUID comparisons in regosql-generated authorization queries
also contributed to the slowdown by preventing index usage for connection
and audit log queries. These now emit native UUID operators.

Frontend changes handle the capped state in usePaginatedQuery and
PaginationWidget, optionally displaying a capped count in the pagination
UI (e.g. "Showing 2,076 to 2,100 of 2,000+ logs")

---

Cherry picked from 86ca61d
@github-actions github-actions Bot added the community Pull Requests and issues created by the community. label Apr 7, 2026
@geokat geokat removed the community Pull Requests and issues created by the community. label Apr 7, 2026
@geokat geokat added the cherry-pick/v2.29 Needs to be cherry-picked to the 2.29 release branch label Apr 7, 2026
@geokat geokat marked this pull request as ready for review April 7, 2026 23:45
@geokat geokat requested a review from Emyrk as a code owner April 7, 2026 23:45
@geokat geokat requested a review from f0ssel April 7, 2026 23:45
@f0ssel f0ssel merged commit 72ce5ac into release/2.29 Apr 9, 2026
36 of 38 checks passed
@f0ssel f0ssel deleted the george/r229/backport-plat-31-connection-and-audit-logs-page-timeouts branch April 9, 2026 16:46
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 9, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

cherry-pick/v2.29 Needs to be cherry-picked to the 2.29 release branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants