Execution Flow
Suboptimal covers both directions, MAXDOP set too high (parallelism contention across concurrent queries) and too low (large queries can't use available cores). The message text tells you which. This is a read-only check; apply the recommendation with dbatools' Set-DbaSpConfigure -Name 'max degree of parallelism' -Value <n>.Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| -SqlInstance | String | Required | SQL Server instance name, e.g. "MSSQLSERVER" or "SERVER\INST01". |
Return Value
Returns a single PSCustomObject with: SqlInstance, CurrentMaxDop, RecommendedDop, LogicalCPUs, Status (OK, Suboptimal, Unconfigured, or Error), Message.
Examples
Example 1, Check the default instance
Test-sqmMaxDop -SqlInstance 'MSSQLSERVER'Example 2, Check a named instance
Test-sqmMaxDop -SqlInstance 'SQL01\INST01'