# Billing Performance Engineering — Naim Saad

> Markdown companion for [the public page](https://naimsaad.com/work/billing-performance). The canonical HTML page is the primary source.

## SQL Server performance & reliability

I led SQL Server and query-plan diagnosis that cut average bill-generation time from 80 to 40 minutes in comparable staging runs and removed the deadlocks and process failures observed there.

## Context

A SQL Server-backed billing process was hitting contention and scaling unreliably under parallel execution.

## Role and ownership

I was the primary engineering owner, working with the chief architect and CTO and documenting the diagnosis and changes for the wider engineering team.

## Constraints and boundaries

The comparison used the same staging environment, dataset, configuration and parallelism. The exact run count and workload size were not retained, so the result is a staging observation rather than a production benchmark.

## Approach

- Diagnosed database contention and query plans under parallel execution.
- Iterated on database and query-level changes for more than a month.
- Held the environment, data, configuration and settings constant for the before-and-after comparison.
- Documented the diagnosis and changes for engineering follow-through.

## Verification

With the environment, dataset, configuration and parallelism held constant, average runtime fell from 80 to 40 minutes; the previously observed deadlocks and process failures did not recur.

## Metrics

- 80 → 40 minutes
- 50% observed runtime reduction

## Outcome

Average bill generation fell from 80 to 40 minutes in the comparable staging runs. The deadlocks and process failures seen before the changes did not recur in those runs.

## Lessons

A performance result is only useful when its comparison conditions are clear and reliability is measured alongside speed.

## Technology

- .NET
- C#
- SQL Server
- Query-plan analysis
- Concurrency diagnosis
