/// Serial row mode self-time: subtract all direct children's effective elapsed.
/// Pass-through operators (Compute Scalar, etc.) don't carry runtime stats —
diff --git a/src/PlanViewer.Web/Pages/Index.razor b/src/PlanViewer.Web/Pages/Index.razor
index eabbcc2..6d885d8 100644
--- a/src/PlanViewer.Web/Pages/Index.razor
+++ b/src/PlanViewer.Web/Pages/Index.razor
@@ -163,7 +163,8 @@ else
@if (ActiveStmt!.QueryTime.ElapsedTimeMs > 0)
{
- var ratio = (double)ActiveStmt!.QueryTime.CpuTimeMs / ActiveStmt!.QueryTime.ElapsedTimeMs;
+ var effectiveCpu = Math.Max(0L, ActiveStmt!.QueryTime.CpuTimeMs - ActiveStmt!.QueryTime.ExternalWaitMs);
+ var ratio = (double)effectiveCpu / ActiveStmt!.QueryTime.ElapsedTimeMs;
CPU:Elapsed
@ratio.ToString("N2")