fix: ensure indexes on audit_logs table #275

Closed
opened 2025-07-08 08:44:16 -04:00 by AtHeartEngineer · 0 comments

Originally created by @ItalyPaleAle on 4/4/2025

The table had complex queries that in all cases were performing full-table scans, and in some cases were parsing each row's data as JSON. This ensures indexes are present on all columns that are used for querying, including on the clientName JSON property in the data column

Also added passing context to the audit log methods which allows interrupting the long-running aggregate queries if the request is canceled (that is a small spin-off from #392 )

*Originally created by @ItalyPaleAle on 4/4/2025* The table had complex queries that in all cases were performing full-table scans, and in some cases were parsing each row's data as JSON. This ensures indexes are present on all columns that are used for querying, including on the `clientName` JSON property in the data column Also added passing context to the audit log methods which allows interrupting the long-running aggregate queries if the request is canceled (that is a small spin-off from #392 )
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/pocket-id#275