You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Server context confirms Standard Edition — check MAXDOP
497
+
if(serverMetadata.MaxDop>2)
498
+
{
499
+
stmt.PlanWarnings.Add(newPlanWarning
500
+
{
501
+
WarningType="Standard Edition DOP Limitation",
502
+
Message=$"DOP is limited to 2 because SQL Server Standard Edition caps parallelism at 2 when batch mode operators are present, even though MAXDOP is set to {serverMetadata.MaxDop}. Developer or Enterprise Edition would allow higher DOP in the same conditions.",
503
+
Severity=PlanWarningSeverity.Warning
504
+
});
505
+
}
506
+
}
507
+
elseif(!editionKnown)
491
508
{
509
+
// No server context, or edition unknown (e.g. collection failure) — suspect the limitation
492
510
stmt.PlanWarnings.Add(newPlanWarning
493
511
{
494
512
WarningType="Standard Edition DOP Limitation",
495
-
Message=$"DOP is limited to 2 because SQL Server Standard Edition caps parallelism at 2 when batch mode operators are present, even though MAXDOP is set to {serverMetadata.MaxDop}. Developer or Enterprise Edition would allow higher DOP in the same conditions.",
496
-
Severity=PlanWarningSeverity.Warning
513
+
Message="DOP is limited to 2 and the plan uses batch mode operators. This may be caused by the SQL Server Standard Edition limitation, which caps parallelism at 2 when batch mode is in use. If this server runs Standard Edition, Developer or Enterprise Edition would allow higher DOP.",
514
+
Severity=PlanWarningSeverity.Info
497
515
});
498
516
}
499
517
}
500
-
elseif(!editionKnown)
501
-
{
502
-
// No server context, or edition unknown (e.g. collection failure) — suspect the limitation
503
-
stmt.PlanWarnings.Add(newPlanWarning
504
-
{
505
-
WarningType="Standard Edition DOP Limitation",
506
-
Message="DOP is limited to 2 and the plan uses batch mode operators. This may be caused by the SQL Server Standard Edition limitation, which caps parallelism at 2 when batch mode is in use. If this server runs Standard Edition, Developer or Enterprise Edition would allow higher DOP.",
507
-
Severity=PlanWarningSeverity.Info
508
-
});
509
-
}
510
518
}
511
519
512
520
// Rules 25 (Ineffective Parallelism) and 31 (Parallel Wait Bottleneck) were removed.
0 commit comments