Below are audit trail performance testing in different technologies / approaches.
- Baseline: Standard DML operations with no audit trail.
- Change Data Capture (CDC): DML operations with CDC to capture audit trail in system tables.
- Trigger: DML operations with trigger to record audit trail in different table.
- Entity Framework 1: DML operations with audit trail recording in Entity Framework’s SaveChanges() method by accessing EF’s OriginalValues object for tracking data changes.
- Entity Framework 2: DML operations with audit trail recording in Entity Framework’s SaveChanges() method by accessing EF’s DbSet object for tracking data changes.
|Change Data Capture (CDC)||1632||2399||2649||6689|
|Entity Framework 1||3517.4||4214.6||3350.3||11106.15|
|Entity Framework 2||3386.35||5678||4916.95||13993.9|
|Test results are in millisecond. Operations are performed with 500 records.|