1

I have a query calling XmlTransform from Microsoft.MasterDataServices.DataQuality on about 1000 rows or so and it takes 30s to do the whole set (the XSL is in a fixed variable), is there any way to see what that actual time spent in XmlTransform was in the execution plan?

https://www.brentozar.com/pastetheplan/?id=H1lXWgoOY

This particular environment is SQL Server 2012

2 Answers 2

2

I ended up using sys.dm_exec_query_stats which has columns like total_clr_time and last_clr_time for a particular execution plan, so this can be used to see the actual results.

1

I'm not sure if the TIME STATISTICS are stored in the execution plan XML anywhere, but you can enable Live Query Statistics in SSMS (specifically the To view live query statistics for one query section) and it'll show you the graphical execution plan in realtime with the row counts as they're being processed and the total time for each operator of the execution plan. Specifically you'd want to watch the time statistics for the UDX operator (that's in the first branch) of your execution plan.

1
  • Unfortunately, I can't use that on SQL Server 2012.
    – Cade Roux
    Nov 24, 2021 at 1:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.