Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

Not all threads are used in Parallel execution plan

$
0
0

Hi experts!

I wrote a query which cross joins 2 tables:

select T.PeriodStart, T.PeriodEnd, count(SessionID) as count_SessionID,sum(cast(SessionDuration as bigint)) as Sum_SessionDuration
from #t T
cross join [Fact1] with(nolock)
where ActivityStart <= T.PeriodEnd
	and ActivityEnd >= T.PeriodStart
group by T.PeriodStart, T.PeriodEnd
option (maxdop 16)

Notice that I have a query option (maxdop 16). When I check execution plan, it shows that degree of parallelism is 16:

But, when I check properties in execution plan for big fact table (Fact1) I'm joining, it says that only 4 threads are actually used:

Is there any meaningful explanation for this?

Thanks in advance,


Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>