SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


cost threshold for parallelism setting


cost threshold for parallelism setting

Author
Message
vsamantha35
vsamantha35
SSCrazy Eights
SSCrazy Eights (9.4K reputation)SSCrazy Eights (9.4K reputation)SSCrazy Eights (9.4K reputation)SSCrazy Eights (9.4K reputation)SSCrazy Eights (9.4K reputation)SSCrazy Eights (9.4K reputation)SSCrazy Eights (9.4K reputation)SSCrazy Eights (9.4K reputation)

Group: General Forum Members
Points: 9379 Visits: 1267
Hi All,

I want to change "cost threshold for parallelism" from 5 to 25 as we are seeing high cpu. Even small queries are getting parallelised.
Ours is a SQL Azure db. Can we change this setting on azure db? If so, how can we do that?

Thanks,

Sam
Grant Fritchey
Grant Fritchey
SSC Guru
SSC Guru (361K reputation)SSC Guru (361K reputation)SSC Guru (361K reputation)SSC Guru (361K reputation)SSC Guru (361K reputation)SSC Guru (361K reputation)SSC Guru (361K reputation)SSC Guru (361K reputation)

Group: General Forum Members
Points: 361745 Visits: 34454
You can't change that setting in Azure SQL Database currently. You can use Database Scoped Configuration to control the MAXDOP, but I'm not a fan of this approach.

----------------------------------------------------
The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood...
Theodore Roosevelt

The Scary DBA
Author of: SQL Server 2017 Query Performance Tuning, 5th Edition and SQL Server Execution Plans, 3rd Edition
Product Evangelist for Red Gate Software
Jeff Moden
Jeff Moden
SSC Guru
SSC Guru (895K reputation)SSC Guru (895K reputation)SSC Guru (895K reputation)SSC Guru (895K reputation)SSC Guru (895K reputation)SSC Guru (895K reputation)SSC Guru (895K reputation)SSC Guru (895K reputation)

Group: General Forum Members
Points: 895181 Visits: 48194
vsamantha35 - Sunday, December 10, 2017 9:40 PM
Hi All,

I want to change "cost threshold for parallelism" from 5 to 25 as we are seeing high cpu. Even small queries are getting parallelised.
Ours is a SQL Azure db. Can we change this setting on azure db? If so, how can we do that?

Thanks,

Sam


This probably (very highly likely) isn't a problem with "cost threshold for parallelism". It's probably a code problem that needs to be addressed (read that as researched and fixed) especially if you're seeing high CPU usage.

--Jeff Moden

RBAR is pronounced ree-bar and is a Modenism for Row-By-Agonizing-Row.
First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column.
If you think its expensive to hire a professional to do the job, wait until you hire an amateur. -- Red Adair

Helpful Links:
How to post code problems
How to post performance problems
Forum FAQs
vsamantha35
vsamantha35
SSCrazy Eights
SSCrazy Eights (9.4K reputation)SSCrazy Eights (9.4K reputation)SSCrazy Eights (9.4K reputation)SSCrazy Eights (9.4K reputation)SSCrazy Eights (9.4K reputation)SSCrazy Eights (9.4K reputation)SSCrazy Eights (9.4K reputation)SSCrazy Eights (9.4K reputation)

Group: General Forum Members
Points: 9379 Visits: 1267
Grant Fritchey - Monday, December 11, 2017 6:34 AM
You can't change that setting in Azure SQL Database currently. You can use Database Scoped Configuration to control the MAXDOP, but I'm not a fan of this approach.


Hi Sir, Thanks for the response. One followup question, if I not able to cost threshold of parallelism is it not so where we end up even small queries getting over parallelised? and on the other hand , lets say, if I have checked the actual execution plan and see small query getting over parallelised and because of which I had used OPTION(MAXDOP = 1) hint. If I do so, whenever I am do a stress testing 50 - 60 concurrent users , will there be a scenario where only 1 core is getting overloads and other ones are sitting idle ? basically, would like know how to have the right balance in such scenarios ??
Grant Fritchey
Grant Fritchey
SSC Guru
SSC Guru (361K reputation)SSC Guru (361K reputation)SSC Guru (361K reputation)SSC Guru (361K reputation)SSC Guru (361K reputation)SSC Guru (361K reputation)SSC Guru (361K reputation)SSC Guru (361K reputation)

Group: General Forum Members
Points: 361745 Visits: 34454
vsamantha35 - Tuesday, December 12, 2017 11:37 AM


Hi Sir, Thanks for the response. One followup question, if I not able to cost threshold of parallelism is it not so where we end up even small queries getting over parallelised? and on the other hand , lets say, if I have checked the actual execution plan and see small query getting over parallelised and because of which I had used OPTION(MAXDOP = 1) hint. If I do so, whenever I am do a stress testing 50 - 60 concurrent users , will there be a scenario where only 1 core is getting overloads and other ones are sitting idle ? basically, would like know how to have the right balance in such scenarios ??

Jeff has largely nailed it. Most of your queries shouldn't go parallel if you're tuning them and running them against a good structure with appropriate indexing. However, you don't have that control, so there really is no other solution for it at this time.
I really don't like using the MAXDOP hint or database configuration unless there is no other option. However, it's possible that you could see that kind of stress occurring if you do. Again, you have fewer knobs to tweak on Azure SQL Database.


----------------------------------------------------
The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood...
Theodore Roosevelt

The Scary DBA
Author of: SQL Server 2017 Query Performance Tuning, 5th Edition and SQL Server Execution Plans, 3rd Edition
Product Evangelist for Red Gate Software
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum









































































































































































SQLServerCentral


Search