3

I want to create a new session in Extended Events to track Queries that use lots of CPU_Time, but whats the Unit of CPU_TIME? ms? Microseconds?...

Duration seems to be Microseconds but I don't really know CPU_TIME and can't find any information regarding this...

Thanks, Jimm

  • CPU time is in miliseconds or here – Kin Shah Sep 1 '16 at 16:10
  • I believe it is ms (i.e. millisecond) – jyao Sep 1 '16 at 16:27
  • I guess for "cpu_time rpc_completed NULL", it means microsecond. But why the description is NULL? – steven tang Jun 26 at 20:49
7

The sys.dm_xe_object_columns DMV shows metadata for each of the columns available for each event. Included is a "description" column, which is useful in answering your question.

select 
    name
    , object_name
    , type_name
    , description 
from
    sys.dm_xe_object_columns
where
    name = 'cpu_time' -- any XE column name here

This will show you all of the extended event objects that have a cpu_time column, and the description will tell you what unit of measure the column uses.

You can see here that units may vary depending on the object. For example:

  • sql_statement_completed: Indicates the CPU time (in microseconds) that is consumed by the statement.
  • sql_batch_completed: The CPU time (in milliseconds) used by the batch.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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