Control the CPU usage during TSQL query- sql 2008

浪子不回头ぞ 提交于 2019-12-11 01:41:50

问题


I have some heavy queries that are running offline on a sql database to manipulate data. the queries are running and sometimes take a significant part of the computer resources. Is there a way to control/adjust the CPU usage on in a given query / stored procedure?

thanks


回答1:


Per query you can use MAXDOP to limit number of CPUs used queries (when parallelism applies)

You can't throttle CPU time or %

If you have one CPU only, then your option is upgrade. However, CPU bound queries generally indicate poor quality code ir lack of indexes etc...



来源:https://stackoverflow.com/questions/5485421/control-the-cpu-usage-during-tsql-query-sql-2008

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!