Check scheduler_id’s for parrallel queries using Extended Events

· Uncategorized

Trying to be good DBA’s, we followed the rule to set the maxdop = number of schedulers per NUMA node. I now want to check how often parallel queries can use different schedulers within the same NUMA node. Following scripts works fine for me.

select DISTINCT session_id , scheduler_id
from sys.dm_os_tasks
WHERE parent_task_address IS NOT NULL
ORDER BY 1,2

But this is ad-hoc. I would like to be able to setup an extended event session on the sql_statement_completed event to collect the same info. But I noticed the scheduler_id collected here is only the one linked to the parent_task, but I’m more interested in the parallel tasks.
Wonder if this is possible.

I logged this on msdn here

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: