{"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":"
\u5bfc\u8bfb<\/td>\n | 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\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 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 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 |