September 15, 2020 at 3:17 pm
Hi - I would like to decrease the performance of SQL for certain users or specific queries.
The majority of users will be running very quick queries that last less than a second as seen by the first two peaks in resource monitor. However this runs across all cores so when I run a larger query that could potential run for minutes or even an hour. The entire server becomes unresponsive and other users will eventually get timeout errors.
Can I limit the number of cores per connection? Or give myself 2 cores and everyone else can share 10? I don't mind waiting but I don't want the other users to be impacted.
Thank you
SQL version 13.0.5026.0
September 15, 2020 at 3:35 pm
I think Resource Governor can help you with that as long as you have enterprise edition.
September 15, 2020 at 3:53 pm
Hi - I would like to decrease the performance of SQL for certain users or specific queries.
The majority of users will be running very quick queries that last less than a second as seen by the first two peaks in resource monitor. However this runs across all cores so when I run a larger query that could potential run for minutes or even an hour. The entire server becomes unresponsive and other users will eventually get timeout errors.
Can I limit the number of cores per connection? Or give myself 2 cores and everyone else can share 10? I don't mind waiting but I don't want the other users to be impacted.
Thank you
SQL version 13.0.5026.0
If you're sure that's the typical behavior of your machine, why not set the MAXDOP for the machine to something other than "0". You could also do that within your own code.
--Jeff Moden
Change is inevitable... Change for the better is not.
September 15, 2020 at 4:14 pm
You can use MAXDOP on an individual query e.g.
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
https://docs.microsoft.com/en-us/sql/t-sql/queries/hints-transact-sql-query?view=sql-server-ver15
September 15, 2020 at 5:32 pm
Be sure also to make sure the "cost threshold for parallelism" is not too low. Hint: the default is too low, if you haven't changed it, you should.
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply