Hi @jonjoseph@gmail.com ,
Does anybody have any idea why sqlserver has decided the best way is to process this really large query in single thread?
The number of worker threads spawned for each task depends on:
1.Whether the request was eligible for parallelism as determined by the Query Optimizer.
2.What is the actual available degree of parallelism (DOP) in the system based on current load. This may differ from estimated DOP, which is based on the server configuration for max degree of parallelism (MAXDOP). For example, the server configuration for MAXDOP may be 8 but the available DOP at runtime can be only 2, which affects query performance. Please reference:thread-and-task-architecture-guide
You can test as next:
Set SQL Engine Server side:
USE dbname;
GO
EXEC sp_configure 'show advanced options', 1;
GO
RECONFIGURE WITH OVERRIDE;
GO
EXEC sp_configure 'max degree of parallelism', 8;
GO
RECONFIGURE WITH OVERRIDE;
GO
USE dbname ;
GO
EXEC sp_configure 'show advanced options', 1;
GO
RECONFIGURE ;
GO
EXEC sp_configure 'max worker threads', 512 ;
GO
RECONFIGURE;
GO
Set SSAS Process side:
Test as next: Change Settings->Processing options->Parallel (Maximum parallel tasks) =4
More information:
configure-the-max-worker-threads-server-configuration-option,
parallel-processing-best-practices
BR,
Mia
If the reply is helped, please do “Accept Answer”.