Skip to content

chore(db): investigate range partitioning for high-write append-only audit tables #454

Description

@ericfitz

Summary

Investigate time-range partitioning (e.g., monthly partitions on created_at) for the append-only audit tables — system_audit_entries and audit_entries/version_snapshots — so that retention pruning on Oracle ADB becomes an instant DROP PARTITION instead of row-by-row DELETE.

Deferred from the #400 design (system-audit retention): current admin write volume (~34 /admin/* write endpoints at typical admin cadence) does not justify the machinery, so #400 ships indexed-created_at DELETE pruning. This issue tracks revisiting that decision if write volume grows.

Originally recommended by the oracle-db-admin review of the #355 schema:

Range partitioning on created_at (e.g., monthly partitions).
The right Oracle pattern for a high-write append-only audit table makes pruning a DROP PARTITION (instant, no redo, no row-by-row delete locking) instead of a DELETE.

Acceptance Criteria

Notes

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestgoPull requests that update go code

    Projects

    Status
    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions