{"id":105390,"date":"2024-09-28T10:46:10","date_gmt":"2024-09-28T02:46:10","guid":{"rendered":"https:\/\/lrxjmw.cn\/?p=105390"},"modified":"2024-09-28T10:46:10","modified_gmt":"2024-09-28T02:46:10","slug":"sql-server-performance","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/sql-server-performance.html","title":{"rendered":"\u89e3\u8bfbSQL Server \u6027\u80fd\u4f18\u5316\u6307\u6807"},"content":{"rendered":"\n\n\n
\u5bfc\u8bfb<\/td>\nPerfmon\u662fWindows\u7cfb\u7edf\u6027\u80fd\u76d1\u89c6\u7a0b\u5e8f\u3002\u7528\u4e8e\u76d1\u89c6CPU\u4f7f\u7528\u7387\u3001\u5185\u5b58\u4f7f\u7528\u7387\u3001\u786c\u76d8\u8bfb\u5199\u901f\u5ea6\u3001\u7f51\u7edc\u901f\u5ea6\u7b49\u3002<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n
Processor\/%Privileged Time<\/strong><\/span><\/div>\n

\u9600\u503c\uff1a\u5982\u679c\u6570\u503c\u6301\u7eed\u5927\u4e8e75%\u5c31\u8868\u793a\u5b58\u5728\u74f6\u9888\u3002<\/p>\n

\u542b\u4e49\uff1a\u8fd9\u4e2a\u8ba1\u6570\u5668\u8868\u793a\u4e00\u4e2a\u7ebf\u7a0b\u5728\u7279\u6743\u6a21\u5f0f\u4e0b\u6240\u4f7f\u7528\u7684\u65f6\u95f4\u6bd4\u4f8b\u3002\u5f53\u4f60\u7684\u7a0b\u5e8f\u8c03\u7528\u64cd\u4f5c\u7cfb\u7edf\u7684\u65b9\u6cd5\uff08\u6bd4\u5982\u6587\u4ef6\u64cd\u4f5c\uff0c\u7f51\u7edcI\/O\u6216\u8005\u5206\u914d\u5185\u5b58\uff09\uff0c\u8fd9\u4e9b\u64cd\u4f5c\u7cfb\u7edf\u7684\u65b9\u6cd5\u662f\u5728\u7279\u6743\u6a21\u5f0f\u4e0b\u8fd0\u884c\u7684\u3002<\/p>\n

Processor\/ %UserTime <\/strong><\/span><\/div>\n

\u4e0e%Privileged Time\u8ba1\u6570\u5668\u6b63\u597d\u76f8\u53cd\uff0c\u6307\u7684\u662f\u5728\u7528\u6237\u72b6\u6001\u6a21\u5f0f\u4e0b\uff08\u5373\u975e\u7279\u6743\u6a21\u5f0f\uff09\u7684\u64cd\u4f5c\u6240\u82b1\u7684\u65f6\u95f4\u767e\u5206\u6bd4\u3002<\/p>\n

Process(sqlservr.exe)\/ %Processor Time <\/strong><\/span><\/div>\n

SQLServer\u8fdb\u884c\u7684CPU\u4f7f\u7528\u60c5\u51b5
\n\"\"<\/p>\n

Processor\/% Interrupt Time <\/strong><\/span><\/div>\n

\u9600\u503c\uff1a\u53d6\u51b3\u4e8e\u5904\u7406\u5668<\/p>\n

\u542b\u4e49\uff1a\u8fd9\u4e2a\u8ba1\u6570\u5668\u8868\u793a\u5904\u7406\u5668\u63a5\u6536\u5904\u7406\u786c\u4ef6\u4e2d\u65ad\u6240\u4f7f\u7528\u7684\u65f6\u95f4\u6bd4\u4f8b\u3002\u8fd9\u4e2a\u503c\u95f4\u63a5\u6307\u51fa\u4ea7\u751f\u4e2d\u65ad\u7684\u786c\u4ef6\u8bbe\u5907\u6d3b\u52a8\uff0c\u6bd4\u5982\u7f51\u7edc\u53d8\u5316\u3002\u8fd9\u4e2a\u8ba1\u6570\u5668\u663e\u8457\u589e\u52a0\u7684\u8bdd\u8868\u793a\u786c\u4ef6\u53ef\u80fd\u5b58\u5728\u95ee\u9898\u3002<\/p>\n

System\/Processor Queue Length <\/strong><\/span><\/div>\n

\u9600\u503c\uff1a\u5e73\u5747\u503c\u6301\u7eed\u5927\u4e8e2\u90a3\u4e48\u8868\u793aCPU\u5b58\u5728\u74f6\u9888<\/p>\n

\u542b\u4e49\uff1a\u5982\u679c\u5c31\u7eea\u7684\u4efb\u52a1\u8d85\u8fc7\u5904\u7406\u80fd\u529b\u7ebf\u7a0b\u5c31\u4f1a\u88ab\u653e\u8fdb\u961f\u5217\u3002\u5904\u7406\u5668\u961f\u5217\u662f\u5c31\u7eea\u4f46\u662f\u672a\u80fd\u88ab\u5904\u7406\u5668\u6267\u884c\u7684\u7ebf\u7a0b\u7684\u96c6\u5408\uff0c\u8fd9\u662f\u56e0\u4e3a\u53e6\u5916\u4e00\u4e2a\u7ebf\u7a0b\u6b63\u5728\u6267\u884c\u72b6\u6001\u3002\u6301\u7eed\u6216\u8005\u53cd\u590d\u53d1\u751f2\u4e2a\u4ee5\u4e0a\u7684\u961f\u5217\u5219\u660e\u786e\u7684\u8868\u793a\u5b58\u5728\u5904\u7406\u5668\u74f6\u9888\u3002\u4f60\u4e5f\u80fd\u901a\u8fc7\u51cf\u5c11\u5e76\u53d1\u53d6\u5f97\u66f4\u5927\u7684\u541e\u5410\u91cf\u3002
\n\u4f60\u53ef\u4ee5\u7ed3\u5408Processor\/% Processor Time\u6765\u51b3\u5b9a\u589e\u52a0CPU\u7684\u8bdd\u4f60\u7684\u7a0b\u5e8f\u662f\u5426\u80fd\u591f\u53d7\u76ca\u3002\u5373\u4f7f\u5728\u591a\u5904\u7406\u5668\u7684\u7535\u8111\u4e0a\uff0c\u5bf9\u4e8eCPU\u65f6\u95f4\u4e5f\u662f\u5355\u961f\u5217\u3002\u56e0\u6b64\uff0c\u5728\u591a\u5904\u7406\u5668\u7535\u8111\u4e0a\uff0cProcessor Queue Length (PQL)\u7684\u503c\u9664\u4ee5\u7528\u6765\u5904\u7406\u8d1f\u8f7d\u7684CPU\u4e2a\u6570\u3002
\n\u5982\u679cCPU\u975e\u5e38\u5fd9\uff0890%\u4ee5\u4e0a\u7684\u4f7f\u7528\u7387\uff09\uff0cPQL\u7684\u5e73\u5747\u503c\u4e5f\u6301\u7eed\u5927\u4e8e2\/CPU\uff0c\u00a0\u8fd9\u662f\u5e94\u8be5\u5b58\u5728CPU\u74f6\u9888\u800c\u4e14\u80fd\u591f\u4ece\u66f4\u591a\u7684CPU\u4e2d\u53d7\u76ca\u3002\u6216\u8005\uff0c\u4f60\u53ef\u4ee5\u51cf\u5c11\u7ebf\u7a0b\u7684\u6570\u91cf\u4ee5\u53ca\u589e\u52a0\u5e94\u7528\u7a0b\u5e8f\u5c42\u7684\u961f\u5217\u3002\u8fd9\u4f1a\u5f15\u8d77\u5c11\u91cf\u7684Context Switching\uff0c\u4f46\u662f\u5c11\u8bb8\u7684Context Switching\u5bf9\u4e8e\u51cf\u5c11CPU\u8d1f\u8f7d\u662f\u6709\u597d\u5904\u7684\u3002PQL\u5927\u4e8e2\u4f46\u662fCPU\u4f7f\u7528\u7387\u5374\u4e0d\u9ad8\u7684\u7684\u5e38\u89c1\u539f\u56e0\u662f\u5bf9CPU\u65f6\u95f4\u7684\u8bf7\u6c42\u968f\u673a\u5230\u8fbe\u800c\u4e14\u7ebf\u7a0b\u5374\u4ece\u5904\u7406\u5668\u7533\u8bf7\u5230\u4e0d\u5bf9\u79f0\u7684CPU\u65f6\u95f4\u3002\u8fd9\u610f\u5473\u7740\u5904\u7406\u5668\u5e76\u4e0d\u662f\u74f6\u9888\uff0c\u800c\u4f60\u7684\u7ebf\u7a0b\u903b\u8f91\u662f\u9700\u8981\u6539\u8fdb\u7684\u3002<\/p>\n

SQLServer:SQL Statistics\/Auto-Param Attempts\/sec<\/strong><\/span><\/div>\n

\u6bcf\u79d2\u7684\u81ea\u52a8\u53c2\u6570\u5316\u5c1d\u8bd5\u6570\u3002 \u5176\u603b\u6570\u5e94\u4e3a\u5931\u8d25\u7684\u3001\u5b89\u5168\u7684\u548c\u4e0d\u5b89\u5168\u7684\u81ea\u52a8\u53c2\u6570\u5316\u5c1d\u8bd5\u4e4b\u548c\u3002 \u5f53 SQL Server \u5b9e\u4f8b\u5c1d\u8bd5\u901a\u8fc7\u5c06\u67d0\u4e9b\u6587\u5b57\u66ff\u6362\u4e3a\u53c2\u6570\u6765\u53c2\u6570\u5316 Transact-SQL \u8bf7\u6c42\u65f6\uff0c\u5c31\u4f1a\u8fdb\u884c\u81ea\u52a8\u53c2\u6570\u5316\uff0c\u8fd9\u6837\u53ef\u4ee5\u5bf9\u591a\u4e2a\u76f8\u4f3c\u7684\u8bf7\u6c42\u518d\u6b21\u4f7f\u7528\u4fdd\u5b58\u5728\u7f13\u5b58\u4e2d\u7684\u6267\u884c\u8ba1\u5212\u3002 \u8bf7\u6ce8\u610f\uff0c\u5728\u66f4\u65b0\u7248\u672c\u7684 SQL Server\u4e2d\uff0c\u81ea\u52a8\u53c2\u6570\u5316\u4e5f\u79f0\u4e3a\u7b80\u5355\u53c2\u6570\u5316\u3002 \u6b64\u8ba1\u6570\u5668\u4e0d\u5305\u62ec\u5f3a\u5236\u53c2\u6570\u5316\u3002<\/p>\n

SQLServer:SQLStatistics\/Failed Auto-params\/sec<\/strong><\/span><\/div>\n

\u6bcf\u79d2\u81ea\u52a8\u53c2\u6570\u5316\u5c1d\u8bd5\u5931\u8d25\u6b21\u6570\u3002 \u8be5\u503c\u5e94\u5f88\u5c0f\u3002 \u8bf7\u6ce8\u610f\uff0c\u5728\u66f4\u9ad8\u7248\u672c\u7684 SQL Server\u4e2d\uff0c\u81ea\u52a8\u53c2\u6570\u5316\u4e5f\u79f0\u4e3a\u7b80\u5355\u53c2\u6570\u5316\u3002<\/p>\n

SQLServer:SQLStatistics\/Batch Requests\/sec<\/strong><\/span><\/div>\n

\u6bcf\u79d2\u6536\u5230\u7684 Transact-SQL \u547d\u4ee4\u6279\u6570\u3002 \u8fd9\u4e00\u7edf\u8ba1\u4fe1\u606f\u53d7\u6240\u6709\u7ea6\u675f\uff08\u5982 I\/O\u3001\u7528\u6237\u6570\u3001\u9ad8\u901f\u7f13\u5b58\u5927\u5c0f\u3001\u8bf7\u6c42\u7684\u590d\u6742\u7a0b\u5ea6\u7b49\uff09\u5f71\u54cd\u3002 \u6279\u5904\u7406\u8bf7\u6c42\u6570\u503c\u9ad8\u610f\u5473\u7740\u541e\u5410\u91cf\u5f88\u597d\u3002<\/p>\n

SQLServer:SQL Statistics\/SQLCompilations\/sec<\/strong><\/span><\/div>\n

\u6bcf\u79d2\u7684 SQL \u7f16\u8bd1\u6570\u3002 \u8868\u793a\u7f16\u8bd1\u4ee3\u7801\u8def\u5f84\u88ab\u8fdb\u5165\u7684\u6b21\u6570\u3002 \u5305\u62ec SQL Server\u4e2d\u8bed\u53e5\u7ea7\u91cd\u65b0\u7f16\u8bd1\u5bfc\u81f4\u7684\u7f16\u8bd1\u3002 \u5f53 SQL Server \u7528\u6237\u6d3b\u52a8\u7a33\u5b9a\u540e\uff0c\u8be5\u503c\u5c06\u8fbe\u5230\u7a33\u5b9a\u72b6\u6001\u3002<\/p>\n

SQLServer:SQL Statistics\/SQLRe-Compilations\/sec<\/strong><\/span><\/div>\n

\u6bcf\u79d2\u8bed\u53e5\u91cd\u65b0\u7f16\u8bd1\u7684\u6b21\u6570\u3002 \u8ba1\u7b97\u89e6\u53d1\u8bed\u53e5\u91cd\u65b0\u7f16\u8bd1\u7684\u6b21\u6570\u3002 \u4e00\u822c\u6765\u8bf4\uff0c\u8fd9\u4e2a\u6570\u503c\u6700\u597d\u8f83\u5c0f\u3002<\/p>\n

\n

\u539f\u6587\u6765\u81ea\uff1ahttp:\/\/www.linuxsir.org\/linuxsjk\/14482.html<\/a><\/p>\n

\u672c\u6587\u5730\u5740\uff1ahttps:\/\/lrxjmw.cn\/sql-server-performance<\/span>.html<\/a><\/span> \u200e\u7f16\u8f91\uff1a\u8d3e\u6625\u534e \u00a0\u5ba1\u6838\u5458\uff1a\u9004\u589e\u5b9d<\/span><\/p>\n<\/blockquote>\n","protected":false},"excerpt":{"rendered":"

\u5bfc\u8bfb Perfmon\u662fWindows\u7cfb\u7edf\u6027\u80fd\u76d1\u89c6\u7a0b\u5e8f\u3002\u7528\u4e8e\u76d1\u89c6CPU\u4f7f\u7528\u7387\u3001\u5185\u5b58\u4f7f\u7528\u7387\u3001\u786c\u76d8\u8bfb\u5199\u901f\u5ea6\u3001\u7f51\u7edc\u901f\u5ea6 […]<\/p>\n","protected":false},"author":63,"featured_media":105418,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[],"class_list":["post-105390","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-thread"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/105390","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/63"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=105390"}],"version-history":[{"count":10,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/105390\/revisions"}],"predecessor-version":[{"id":293272,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/105390\/revisions\/293272"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/105418"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=105390"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=105390"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=105390"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}