Azure SQL DB Maxdop Hint

I had a good question from JP via a comment on my blog about whether you can use the MAXDOP query hint in Azure SQL Database. The answer? Yes.

Just to prove it, my first query I prevent parallelism via MAXDOP = 1.

SELECT *
FROM [dbo].[GlobalAudi]
ORDER BY Date
OPTION (MAXDOP 1)
GO

lemon1maxdop

I check the operator properties of the clustered scan where parallel is false.

false

So what happens with the below query?

SELECT *
FROM [dbo].[GlobalAudi]
ORDER BY Date
OPTION (MAXDOP 2)
GO

It is as you would expect.

gonepa

Now a question for you, which one was faster?

 

3 thoughts on “Azure SQL DB Maxdop Hint

  1. Great, thank you BLOBEATER !

    Regarding your question, the obvious answer would be the second one (MAXDOP 2), so this probably is a tricky question 🙂

    Best Regards from Brazil, awesome blog !

    Like

  2. Pingback: Azure SQL Database – Maxdop Updated | All About Data

Leave a Reply