business rules

SQLServerCentral Article

Manage Your Business Rules in T-SQL Query

  • Article

Motivation At some point in the carrer, we have come across the problem of hard-coded values in SELECT or WHERE clauses.  And we all agree that these hardcoded values must be parametrised. This bad habit usually backfires when we need to troubleshoot a query. These hardcoded values are usually a business role baked in the […]

4 (1)

You rated this post out of 5. Change rating

2022-10-18 (first published: )

11,194 reads

Blogs

The Book of Redgate: Meetings

By

I think we might have forgotten this a bit, but on one of the...

New article: Automating SQL Server Builds

By

I refresh my test SQL Servers at least monthly with a fresh VM. Setting...

Leading with Accountability: How Extreme Ownership Transforms Leadership

By

Embracing Total Responsibility In every organization there comes a moment when teams must choose...

Read the latest Blogs

Forums

ssrs subscription file share

By jshumaker

I am trying to create a subscription that posts to a one drive directory. ...

What is Delayed Durability in SQL Server — And Should You Turn It On?

By Chandan Shukla

Comments posted to this topic are about the item What is Delayed Durability in...

Which MAXDOP?

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Which MAXDOP?

Visit the forum

Question of the Day

Which MAXDOP?

I have a SQL Server 2022 instance with this setting:

EXECUTE sp_configure 'max degree of parallelism', 4;
GO
I then run this:
SELECT ProductID, OrderQty, SUM(LineTotal) AS Total
FROM Sales.SalesOrderDetail
WHERE UnitPrice < $5.00
GROUP BY ProductID, OrderQty
ORDER BY ProductID, OrderQty
OPTION (MAXDOP 2);
GO
What is the maxdop for my query?

See possible answers