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?

 

1 thought 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

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s