`PgScanTelemetryRepo::record_batch` (crates/dpp-dal/src/pg/repo_scan.rs) upserts each scan and QR-render row individually in a loop, inside one transaction. Flagged by review on #45 as inefficient — a single `INSERT ... ON CONFLICT` using `UNNEST` over both arrays would do it in one round-trip instead of N.
Deferred out of #45: at current/near-term scan volume the batches per flush interval are small, so the loop isn't a real bottleneck yet, and it matches the existing per-row idiom in `repo_evidence.rs`. Worth revisiting if flush batch sizes grow enough that per-row round-trips inside the transaction show up in practice.
`PgScanTelemetryRepo::record_batch` (crates/dpp-dal/src/pg/repo_scan.rs) upserts each scan and QR-render row individually in a loop, inside one transaction. Flagged by review on #45 as inefficient — a single `INSERT ... ON CONFLICT` using `UNNEST` over both arrays would do it in one round-trip instead of N.
Deferred out of #45: at current/near-term scan volume the batches per flush interval are small, so the loop isn't a real bottleneck yet, and it matches the existing per-row idiom in `repo_evidence.rs`. Worth revisiting if flush batch sizes grow enough that per-row round-trips inside the transaction show up in practice.