How to reconcile the cumulative duration to the sum of the pieces
Where is the other 600 ms hiding in this proc? I see an insert for 410 and a significant number of other single and double digit times but none of that adds up to the 1+ second duration reported.
Figured it out. It is the compile time of the statement with OPTION(RECOMPILE). I can't win on this proc.
and with a bit of denormalization and one new index, i have this proc execution to regular durations of <200ms. That is significantly better than the 1.2+seconds i started with.