{"id":93842,"date":"2024-10-19T17:22:22","date_gmt":"2024-10-19T09:22:22","guid":{"rendered":"https:\/\/server.hk\/cnblog\/93842\/"},"modified":"2024-10-19T17:22:23","modified_gmt":"2024-10-19T09:22:23","slug":"oracle-9i%e5%9c%a8aix%e4%b8%8a%e7%9a%84%e6%80%a7%e8%83%bd%e8%aa%bf%e6%95%b4%e5%af%a6%e6%93%8d","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/93842\/","title":{"rendered":"Oracle 9i\u5728AIX\u4e0a\u7684\u6027\u80fd\u8abf\u6574\u5be6\u64cd"},"content":{"rendered":"<h1 id=\"oracle-9i%e5%9c%a8aix%e4%b8%8a%e7%9a%84%e6%80%a7%e8%83%bd%e8%aa%bf%e6%95%b4%e5%af%a6%e6%93%8d-gKiVogROYl\">Oracle 9i\u5728AIX\u4e0a\u7684\u6027\u80fd\u8abf\u6574\u5be6\u64cd<\/h1>\n<p>\u5728\u7576\u4eca\u7684\u6578\u64da\u9a45\u52d5\u74b0\u5883\u4e2d\uff0c\u6578\u64da\u5eab\u7684\u6027\u80fd\u512a\u5316\u5c0d\u65bc\u4f01\u696d\u7684\u6210\u529f\u81f3\u95dc\u91cd\u8981\u3002Oracle 9i\u4f5c\u70ba\u4e00\u6b3e\u6210\u719f\u7684\u6578\u64da\u5eab\u7ba1\u7406\u7cfb\u7d71\uff0c\u5ee3\u6cdb\u61c9\u7528\u65bc\u5404\u7a2e\u696d\u52d9\u5834\u666f\u3002\u672c\u6587\u5c07\u63a2\u8a0e\u5728AIX\u64cd\u4f5c\u7cfb\u7d71\u4e0a\u9032\u884cOracle 9i\u6027\u80fd\u8abf\u6574\u7684\u5be6\u64cd\u65b9\u6cd5\uff0c\u5e6b\u52a9\u7528\u6236\u63d0\u5347\u6578\u64da\u5eab\u7684\u904b\u884c\u6548\u7387\u3002<\/p>\n<h2 id=\"1-%e7%a1%ac%e9%ab%94%e9%85%8d%e7%bd%ae%e7%9a%84%e8%80%83%e9%87%8f-gKiVogROYl\">1. \u786c\u9ad4\u914d\u7f6e\u7684\u8003\u91cf<\/h2>\n<p>\u5728\u9032\u884c\u6027\u80fd\u8abf\u6574\u4e4b\u524d\uff0c\u9996\u5148\u9700\u8981\u78ba\u4fdd\u786c\u9ad4\u914d\u7f6e\u80fd\u5920\u652f\u6301Oracle 9i\u7684\u904b\u884c\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u95dc\u9375\u7684\u786c\u9ad4\u914d\u7f6e\u5efa\u8b70\uff1a<\/p>\n<ul>\n<li><strong>CPU\uff1a<\/strong>\u9078\u64c7\u591a\u6838\u8655\u7406\u5668\u4ee5\u63d0\u9ad8\u4e26\u884c\u8655\u7406\u80fd\u529b\u3002<\/li>\n<li><strong>\u5167\u5b58\uff1a<\/strong>\u5efa\u8b70\u81f3\u5c11\u914d\u7f6e4GB\u7684\u5167\u5b58\uff0c\u6839\u64da\u6578\u64da\u5eab\u7684\u5927\u5c0f\u548c\u7528\u6236\u6578\u91cf\u9032\u884c\u8abf\u6574\u3002<\/li>\n<li><strong>\u78c1\u789f\uff1a<\/strong>\u4f7f\u7528RAID\u6280\u8853\u4f86\u63d0\u9ad8\u78c1\u789f\u7684\u8b80\u5beb\u901f\u5ea6\uff0c\u4e26\u78ba\u4fdd\u6578\u64da\u7684\u5b89\u5168\u6027\u3002<\/li>\n<\/ul>\n<h2 id=\"2-oracle-9i%e7%9a%84%e5%88%9d%e5%a7%8b%e5%8c%96%e5%8f%83%e6%95%b8%e8%aa%bf%e6%95%b4-gKiVogROYl\">2. Oracle 9i\u7684\u521d\u59cb\u5316\u53c3\u6578\u8abf\u6574<\/h2>\n<p>Oracle 9i\u7684\u6027\u80fd\u8abf\u6574\u4e3b\u8981\u4f9d\u8cf4\u65bc\u521d\u59cb\u5316\u53c3\u6578\u7684\u8a2d\u7f6e\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u91cd\u8981\u7684\u53c3\u6578\u53ca\u5176\u5efa\u8b70\u8a2d\u7f6e\uff1a<\/p>\n<ul>\n<li><strong>SGA_TARGET\uff1a<\/strong>\u8a2d\u7f6e\u5171\u4eab\u5167\u5b58\u5340\u7684\u5927\u5c0f\uff0c\u5efa\u8b70\u6839\u64da\u7cfb\u7d71\u5167\u5b58\u7684\u5927\u5c0f\u9032\u884c\u8abf\u6574\u3002<\/li>\n<li><strong>PGA_AGGREGATE_TARGET\uff1a<\/strong>\u8a2d\u7f6e\u7a0b\u5e8f\u5168\u5c40\u5340\u7684\u5927\u5c0f\uff0c\u4ee5\u63d0\u9ad8\u67e5\u8a62\u6027\u80fd\u3002<\/li>\n<li><strong>DB_BLOCK_SIZE\uff1a<\/strong>\u6839\u64da\u61c9\u7528\u9700\u6c42\u9078\u64c7\u5408\u9069\u7684\u6578\u64da\u584a\u5927\u5c0f\uff0c\u901a\u5e38\u70ba8KB\u3002<\/li>\n<\/ul>\n<p>\u53ef\u4ee5\u901a\u904e\u4ee5\u4e0bSQL\u8a9e\u53e5\u4f86\u67e5\u770b\u548c\u4fee\u6539\u9019\u4e9b\u53c3\u6578\uff1a<\/p>\n<pre><code>-- \u67e5\u770b\u7576\u524d\u53c3\u6578\nSHOW PARAMETER SGA_TARGET;\nSHOW PARAMETER PGA_AGGREGATE_TARGET;\n\n-- \u4fee\u6539\u53c3\u6578\nALTER SYSTEM SET SGA_TARGET=2G SCOPE=BOTH;\nALTER SYSTEM SET PGA_AGGREGATE_TARGET=1G SCOPE=BOTH;<\/code><\/pre>\n<h2 id=\"3-%e6%95%b8%e6%93%9a%e5%ba%ab%e7%9a%84%e7%b4%a2%e5%bc%95%e5%84%aa%e5%8c%96-gKiVogROYl\">3. \u6578\u64da\u5eab\u7684\u7d22\u5f15\u512a\u5316<\/h2>\n<p>\u7d22\u5f15\u662f\u63d0\u9ad8\u67e5\u8a62\u6027\u80fd\u7684\u91cd\u8981\u624b\u6bb5\u3002\u5c0d\u65bcOracle 9i\uff0c\u7528\u6236\u61c9\u5b9a\u671f\u6aa2\u67e5\u548c\u512a\u5316\u7d22\u5f15\uff1a<\/p>\n<ul>\n<li><strong>\u5275\u5efa\u5408\u9069\u7684\u7d22\u5f15\uff1a<\/strong>\u6839\u64da\u67e5\u8a62\u7684\u983b\u7387\u548c\u985e\u578b\u5275\u5efa\u7d22\u5f15\u3002<\/li>\n<li><strong>\u91cd\u5efa\u788e\u7247\u5316\u7684\u7d22\u5f15\uff1a<\/strong>\u4f7f\u7528\u4ee5\u4e0bSQL\u8a9e\u53e5\u91cd\u5efa\u7d22\u5f15\uff1a<\/li>\n<\/ul>\n<pre><code>ALTER INDEX index_name REBUILD;<\/code><\/pre>\n<h2 id=\"4-sql%e6%9f%a5%e8%a9%a2%e7%9a%84%e5%84%aa%e5%8c%96-gKiVogROYl\">4. SQL\u67e5\u8a62\u7684\u512a\u5316<\/h2>\n<p>\u512a\u5316SQL\u67e5\u8a62\u662f\u63d0\u5347\u6578\u64da\u5eab\u6027\u80fd\u7684\u53e6\u4e00\u500b\u95dc\u9375\u65b9\u9762\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u512a\u5316\u5efa\u8b70\uff1a<\/p>\n<ul>\n<li><strong>\u4f7f\u7528EXPLAIN PLAN\uff1a<\/strong>\u5206\u6790\u67e5\u8a62\u8a08\u5283\uff0c\u627e\u51fa\u6027\u80fd\u74f6\u9838\u3002<\/li>\n<li><strong>\u907f\u514d\u4f7f\u7528SELECT *\uff1a<\/strong>\u50c5\u9078\u64c7\u9700\u8981\u7684\u5217\u4ee5\u6e1b\u5c11\u6578\u64da\u50b3\u8f38\u91cf\u3002<\/li>\n<li><strong>\u4f7f\u7528JOIN\u800c\u975e\u5b50\u67e5\u8a62\uff1a<\/strong>\u5728\u53ef\u80fd\u7684\u60c5\u6cc1\u4e0b\uff0c\u4f7f\u7528JOIN\u4f86\u63d0\u9ad8\u67e5\u8a62\u6548\u7387\u3002<\/li>\n<\/ul>\n<h2 id=\"5-%e7%9b%a3%e6%8e%a7%e5%92%8c%e8%aa%bf%e6%95%b4-gKiVogROYl\">5. \u76e3\u63a7\u548c\u8abf\u6574<\/h2>\n<p>\u6027\u80fd\u8abf\u6574\u662f\u4e00\u500b\u6301\u7e8c\u7684\u904e\u7a0b\u3002\u7528\u6236\u61c9\u5b9a\u671f\u76e3\u63a7\u6578\u64da\u5eab\u7684\u6027\u80fd\u6307\u6a19\uff0c\u5982CPU\u4f7f\u7528\u7387\u3001\u5167\u5b58\u4f7f\u7528\u60c5\u6cc1\u548c\u78c1\u789fI\/O\u7b49\u3002\u53ef\u4ee5\u4f7f\u7528Oracle\u63d0\u4f9b\u7684\u5de5\u5177\uff0c\u5982Enterprise Manager\uff0c\u4f86\u9032\u884c\u6027\u80fd\u76e3\u63a7\u548c\u8abf\u6574\u3002<\/p>\n<h2 id=\"%e7%b8%bd%e7%b5%90-gKiVogROYl\">\u7e3d\u7d50<\/h2>\n<p>\u5728AIX\u4e0a\u9032\u884cOracle 9i\u7684\u6027\u80fd\u8abf\u6574\u9700\u8981\u5f9e\u786c\u9ad4\u914d\u7f6e\u3001\u521d\u59cb\u5316\u53c3\u6578\u3001\u7d22\u5f15\u512a\u5316\u3001SQL\u67e5\u8a62\u512a\u5316\u53ca\u6301\u7e8c\u76e3\u63a7\u7b49\u591a\u65b9\u9762\u5165\u624b\u3002\u900f\u904e\u9019\u4e9b\u5be6\u64cd\u65b9\u6cd5\uff0c\u4f01\u696d\u53ef\u4ee5\u986f\u8457\u63d0\u5347\u6578\u64da\u5eab\u7684\u904b\u884c\u6548\u7387\uff0c\u5f9e\u800c\u652f\u6301\u696d\u52d9\u7684\u767c\u5c55\u3002\u5982\u679c\u60a8\u5c0d\u65bcVPS\u6216\u5176\u4ed6\u4f3a\u670d\u5668\u89e3\u6c7a\u65b9\u6848\u611f\u8208\u8da3\uff0c\u6b61\u8fce\u8a2a\u554f\u6211\u5011\u7684\u7db2\u7ad9\u4e86\u89e3\u66f4\u591a\u4fe1\u606f\uff1a<a href=\"https:\/\/server.hk\">\u9999\u6e2fVPS<\/a>\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u63a2\u7d22Oracle 9i\u5728AIX\u4e0a\u7684\u6027\u80fd\u8abf\u6574\u5be6\u64cd\u6280\u5de7\uff0c\u63d0\u5347\u6578\u64da\u5eab\u6548\u7387\uff0c\u512a\u5316\u7cfb\u7d71\u8cc7\u6e90\u4f7f\u7528\uff0c\u5be6\u73fe\u6700\u4f73\u6027\u80fd\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-93842","post","type-post","status-publish","format-standard","hentry","category-database"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/93842","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=93842"}],"version-history":[{"count":1,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/93842\/revisions"}],"predecessor-version":[{"id":93843,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/93842\/revisions\/93843"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=93842"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=93842"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=93842"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}