{"id":182892,"date":"2024-11-10T00:12:20","date_gmt":"2024-11-09T16:12:20","guid":{"rendered":"https:\/\/server.hk\/cnblog\/182892\/"},"modified":"2024-11-10T00:12:22","modified_gmt":"2024-11-09T16:12:22","slug":"%e5%af%a6%e6%99%82%e7%8d%b2%e5%8f%96%e6%95%b8%e6%93%9a%e5%ba%ab%e5%8f%83%e6%95%b8%ef%bc%8c%e6%8f%90%e5%8d%87%e6%95%b8%e6%93%9a%e8%99%95%e7%90%86%e6%95%88%e7%8e%87%ef%bc%88%e5%8b%95%e6%85%8b%e8%ab%8b","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/182892\/","title":{"rendered":"\u5be6\u6642\u7372\u53d6\u6578\u64da\u5eab\u53c3\u6578\uff0c\u63d0\u5347\u6578\u64da\u8655\u7406\u6548\u7387\uff08\u52d5\u614b\u8acb\u6c42\u6578\u64da\u5eab\u53c3\u6578\uff09"},"content":{"rendered":"<h1 id=\"%e5%af%a6%e6%99%82%e7%8d%b2%e5%8f%96%e6%95%b8%e6%93%9a%e5%ba%ab%e5%8f%83%e6%95%b8%ef%bc%8c%e6%8f%90%e5%8d%87%e6%95%b8%e6%93%9a%e8%99%95%e7%90%86%e6%95%88%e7%8e%87%ef%bc%88%e5%8b%95%e6%85%8b%e8%ab%8b-IVoAlxEDbJ\">\u5be6\u6642\u7372\u53d6\u6578\u64da\u5eab\u53c3\u6578\uff0c\u63d0\u5347\u6578\u64da\u8655\u7406\u6548\u7387\uff08\u52d5\u614b\u8acb\u6c42\u6578\u64da\u5eab\u53c3\u6578\uff09<\/h1>\n<p>\u5728\u7576\u4eca\u6578\u64da\u9a45\u52d5\u7684\u4e16\u754c\u4e2d\uff0c\u6578\u64da\u5eab\u7684\u6027\u80fd\u548c\u6548\u7387\u5c0d\u65bc\u4f01\u696d\u7684\u6210\u529f\u81f3\u95dc\u91cd\u8981\u3002\u96a8\u8457\u696d\u52d9\u9700\u6c42\u7684\u8b8a\u5316\uff0c\u5be6\u6642\u7372\u53d6\u6578\u64da\u5eab\u53c3\u6578\u6210\u70ba\u63d0\u5347\u6578\u64da\u8655\u7406\u6548\u7387\u7684\u4e00\u500b\u91cd\u8981\u624b\u6bb5\u3002\u672c\u6587\u5c07\u63a2\u8a0e\u5982\u4f55\u52d5\u614b\u8acb\u6c42\u6578\u64da\u5eab\u53c3\u6578\uff0c\u4e26\u63d0\u4f9b\u4e00\u4e9b\u5be6\u7528\u7684\u793a\u4f8b\u548c\u5efa\u8b70\u3002<\/p>\n<h2 id=\"%e4%bb%80%e9%ba%bc%e6%98%af%e6%95%b8%e6%93%9a%e5%ba%ab%e5%8f%83%e6%95%b8%ef%bc%9f-IVoAlxEDbJ\">\u4ec0\u9ebc\u662f\u6578\u64da\u5eab\u53c3\u6578\uff1f<\/h2>\n<p>\u6578\u64da\u5eab\u53c3\u6578\u662f\u6307\u5f71\u97ff\u6578\u64da\u5eab\u904b\u884c\u548c\u6027\u80fd\u7684\u5404\u7a2e\u8a2d\u7f6e\u548c\u914d\u7f6e\u3002\u9019\u4e9b\u53c3\u6578\u53ef\u4ee5\u5305\u62ec\u7de9\u885d\u5340\u5927\u5c0f\u3001\u9023\u63a5\u6578\u91cf\u3001\u67e5\u8a62\u8d85\u6642\u8a2d\u7f6e\u7b49\u3002\u901a\u904e\u8abf\u6574\u9019\u4e9b\u53c3\u6578\uff0c\u6578\u64da\u5eab\u7ba1\u7406\u54e1\u53ef\u4ee5\u512a\u5316\u6578\u64da\u5eab\u7684\u6027\u80fd\uff0c\u4ee5\u6eff\u8db3\u7279\u5b9a\u7684\u696d\u52d9\u9700\u6c42\u3002<\/p>\n<h2 id=\"%e7%82%ba%e4%bb%80%e9%ba%bc%e9%9c%80%e8%a6%81%e5%af%a6%e6%99%82%e7%8d%b2%e5%8f%96%e6%95%b8%e6%93%9a%e5%ba%ab%e5%8f%83%e6%95%b8%ef%bc%9f-IVoAlxEDbJ\">\u70ba\u4ec0\u9ebc\u9700\u8981\u5be6\u6642\u7372\u53d6\u6578\u64da\u5eab\u53c3\u6578\uff1f<\/h2>\n<p>\u5be6\u6642\u7372\u53d6\u6578\u64da\u5eab\u53c3\u6578\u7684\u4e3b\u8981\u539f\u56e0\u5305\u62ec\uff1a<\/p>\n<ul>\n<li><strong>\u52d5\u614b\u8abf\u6574\uff1a<\/strong>\u96a8\u8457\u696d\u52d9\u9700\u6c42\u7684\u8b8a\u5316\uff0c\u6578\u64da\u5eab\u7684\u8ca0\u8f09\u548c\u6027\u80fd\u8981\u6c42\u4e5f\u6703\u96a8\u4e4b\u8b8a\u5316\u3002\u5be6\u6642\u7372\u53d6\u53c3\u6578\u53ef\u4ee5\u5e6b\u52a9\u7ba1\u7406\u54e1\u6839\u64da\u7576\u524d\u60c5\u6cc1\u9032\u884c\u8abf\u6574\u3002<\/li>\n<li><strong>\u6545\u969c\u6392\u9664\uff1a<\/strong>\u5728\u6578\u64da\u5eab\u51fa\u73fe\u6027\u80fd\u554f\u984c\u6642\uff0c\u5be6\u6642\u7372\u53d6\u53c3\u6578\u53ef\u4ee5\u5e6b\u52a9\u5feb\u901f\u8b58\u5225\u554f\u984c\u7684\u6839\u6e90\uff0c\u5f9e\u800c\u9032\u884c\u6709\u6548\u7684\u6545\u969c\u6392\u9664\u3002<\/li>\n<li><strong>\u6027\u80fd\u76e3\u63a7\uff1a<\/strong>\u901a\u904e\u6301\u7e8c\u76e3\u63a7\u6578\u64da\u5eab\u53c3\u6578\uff0c\u7ba1\u7406\u54e1\u53ef\u4ee5\u53ca\u6642\u767c\u73fe\u6f5b\u5728\u7684\u6027\u80fd\u74f6\u9838\uff0c\u4e26\u63a1\u53d6\u76f8\u61c9\u7684\u63aa\u65bd\u9032\u884c\u512a\u5316\u3002<\/li>\n<\/ul>\n<h2 id=\"%e5%a6%82%e4%bd%95%e5%af%a6%e6%99%82%e7%8d%b2%e5%8f%96%e6%95%b8%e6%93%9a%e5%ba%ab%e5%8f%83%e6%95%b8-IVoAlxEDbJ\">\u5982\u4f55\u5be6\u6642\u7372\u53d6\u6578\u64da\u5eab\u53c3\u6578<\/h2>\n<p>\u5be6\u6642\u7372\u53d6\u6578\u64da\u5eab\u53c3\u6578\u7684\u65b9\u6cd5\u53d6\u6c7a\u65bc\u6240\u4f7f\u7528\u7684\u6578\u64da\u5eab\u7ba1\u7406\u7cfb\u7d71\uff08DBMS\uff09\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u5e38\u898b\u7684\u6578\u64da\u5eab\u7cfb\u7d71\u53ca\u5176\u7372\u53d6\u53c3\u6578\u7684\u65b9\u5f0f\uff1a<\/p>\n<h3 id=\"1-mysql-IVoAlxEDbJ\">1. MySQL<\/h3>\n<p>\u5728MySQL\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0bSQL\u67e5\u8a62\u4f86\u7372\u53d6\u7576\u524d\u7684\u6578\u64da\u5eab\u53c3\u6578\uff1a<\/p>\n<pre><code>SHOW VARIABLES;<\/code><\/pre>\n<p>\u9019\u5c07\u8fd4\u56de\u6240\u6709\u7684\u7cfb\u7d71\u8b8a\u91cf\u53ca\u5176\u7576\u524d\u503c\u3002\u82e5\u8981\u7372\u53d6\u7279\u5b9a\u7684\u53c3\u6578\uff0c\u53ef\u4ee5\u4f7f\u7528\uff1a<\/p>\n<pre><code>SHOW VARIABLES LIKE 'max_connections';<\/code><\/pre>\n<h3 id=\"2-postgresql-IVoAlxEDbJ\">2. PostgreSQL<\/h3>\n<p>\u5728PostgreSQL\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u67e5\u8a62\u4f86\u7372\u53d6\u53c3\u6578\uff1a<\/p>\n<pre><code>SELECT name, setting FROM pg_settings;<\/code><\/pre>\n<p>\u9019\u5c07\u8fd4\u56de\u6240\u6709\u7684\u914d\u7f6e\u53c3\u6578\u53ca\u5176\u7576\u524d\u8a2d\u7f6e\u3002\u82e5\u8981\u67e5\u8a62\u7279\u5b9a\u53c3\u6578\uff0c\u53ef\u4ee5\u4f7f\u7528\uff1a<\/p>\n<pre><code>SELECT setting FROM pg_settings WHERE name = 'max_connections';<\/code><\/pre>\n<h3 id=\"3-sql-server-IVoAlxEDbJ\">3. SQL Server<\/h3>\n<p>\u5728SQL Server\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u67e5\u8a62\u4f86\u7372\u53d6\u7576\u524d\u7684\u914d\u7f6e\u9078\u9805\uff1a<\/p>\n<pre><code>EXEC sp_configure;<\/code><\/pre>\n<p>\u82e5\u8981\u67e5\u8a62\u7279\u5b9a\u7684\u914d\u7f6e\u9078\u9805\uff0c\u53ef\u4ee5\u4f7f\u7528\uff1a<\/p>\n<pre><code>EXEC sp_configure 'max degree of parallelism';<\/code><\/pre>\n<h2 id=\"%e6%8f%90%e5%8d%87%e6%95%b8%e6%93%9a%e8%99%95%e7%90%86%e6%95%88%e7%8e%87%e7%9a%84%e7%ad%96%e7%95%a5-IVoAlxEDbJ\">\u63d0\u5347\u6578\u64da\u8655\u7406\u6548\u7387\u7684\u7b56\u7565<\/h2>\n<p>\u9664\u4e86\u5be6\u6642\u7372\u53d6\u6578\u64da\u5eab\u53c3\u6578\u5916\uff0c\u9084\u6709\u5176\u4ed6\u4e00\u4e9b\u7b56\u7565\u53ef\u4ee5\u5e6b\u52a9\u63d0\u5347\u6578\u64da\u8655\u7406\u6548\u7387\uff1a<\/p>\n<ul>\n<li><strong>\u7d22\u5f15\u512a\u5316\uff1a<\/strong>\u78ba\u4fdd\u6578\u64da\u5eab\u4e2d\u7684\u7d22\u5f15\u8a2d\u7f6e\u5408\u7406\uff0c\u4ee5\u52a0\u5feb\u67e5\u8a62\u901f\u5ea6\u3002<\/li>\n<li><strong>\u67e5\u8a62\u512a\u5316\uff1a<\/strong>\u5206\u6790\u548c\u512a\u5316SQL\u67e5\u8a62\uff0c\u6e1b\u5c11\u4e0d\u5fc5\u8981\u7684\u8a08\u7b97\u548c\u6578\u64da\u50b3\u8f38\u3002<\/li>\n<li><strong>\u8cc7\u6e90\u76e3\u63a7\uff1a<\/strong>\u5b9a\u671f\u76e3\u63a7\u6578\u64da\u5eab\u7684\u8cc7\u6e90\u4f7f\u7528\u60c5\u6cc1\uff0c\u53ca\u6642\u8abf\u6574\u914d\u7f6e\u4ee5\u61c9\u5c0d\u8b8a\u5316\u7684\u8ca0\u8f09\u3002<\/li>\n<\/ul>\n<h2 id=\"%e7%b5%90%e8%ab%96-IVoAlxEDbJ\">\u7d50\u8ad6<\/h2>\n<p>\u5be6\u6642\u7372\u53d6\u6578\u64da\u5eab\u53c3\u6578\u662f\u63d0\u5347\u6578\u64da\u8655\u7406\u6548\u7387\u7684\u91cd\u8981\u624b\u6bb5\u3002\u901a\u904e\u52d5\u614b\u8acb\u6c42\u548c\u8abf\u6574\u9019\u4e9b\u53c3\u6578\uff0c\u6578\u64da\u5eab\u7ba1\u7406\u54e1\u53ef\u4ee5\u66f4\u597d\u5730\u61c9\u5c0d\u696d\u52d9\u9700\u6c42\u7684\u8b8a\u5316\uff0c\u4e26\u78ba\u4fdd\u7cfb\u7d71\u7684\u7a69\u5b9a\u6027\u548c\u6027\u80fd\u3002\u7121\u8ad6\u662fMySQL\u3001PostgreSQL\u9084\u662fSQL Server\uff0c\u4e86\u89e3\u5982\u4f55\u7372\u53d6\u548c\u8abf\u6574\u6578\u64da\u5eab\u53c3\u6578\u90fd\u662f\u6bcf\u4f4d\u6578\u64da\u5eab\u7ba1\u7406\u54e1\u5fc5\u5099\u7684\u6280\u80fd\u3002<\/p>\n<p>\u5982\u679c\u60a8\u6b63\u5728\u5c0b\u627e\u9ad8\u6548\u7684 <a href=\"https:\/\/server.hk\">\u9999\u6e2fVPS<\/a> \u89e3\u6c7a\u65b9\u6848\uff0cServer.HK \u63d0\u4f9b\u591a\u7a2e\u9078\u64c7\uff0c\u5e6b\u52a9\u60a8\u512a\u5316\u6578\u64da\u5eab\u6027\u80fd\uff0c\u63d0\u5347\u696d\u52d9\u6548\u7387\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5be6\u6642\u7372\u53d6\u6578\u64da\u5eab\u53c3\u6578\uff0c\u63d0\u5347\u6578\u64da\u8655\u7406\u6548\u7387\uff0c\u52d5\u614b\u8acb\u6c42\u6578\u64da\u5eab\u53c3\u6578\uff0c\u52a9\u529b\u696d\u52d9\u6c7a\u7b56\u8207\u6027\u80fd\u512a\u5316\u3002<\/p>\n","protected":false},"author":0,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[101],"tags":[],"class_list":["post-182892","post","type-post","status-publish","format-standard","hentry","category-database"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/182892","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/types\/post"}],"replies":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/comments?post=182892"}],"version-history":[{"count":1,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/182892\/revisions"}],"predecessor-version":[{"id":182893,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/182892\/revisions\/182893"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=182892"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=182892"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=182892"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}