Skip to content

Partition the audit_events table by year

Summary

Once we start tracking frequent events such as #1411 (closed) - querying the audit_events table will become slower. Update: #1411 (closed) was released in 12.3 behind a flag due to performance concerns. This issue should enable this logging to become generally available.

Proposal

  • Confirm if partitioning by audit_events is the right action to take
  • Partition the audit_events table by range on the created_at column.
  • Tables should be created for each year with a schema like audit_events-yyyy specifying the year of the relevant records

This is similar to the work being done to partition the events table #24538 (closed).

Current Plan

This issue is blocked by other database partitioning efforts. Here is the plan:

  1. Evaluate whether it would be better to partition this table, or split the table by event types (#215307 (closed))
  2. Complete all issues in &2023
  3. Complete this issue
  4. Enable logging of git push actions by default
Edited by Joshua Lambert