{"id":167955,"date":"2024-11-06T08:18:23","date_gmt":"2024-11-06T00:18:23","guid":{"rendered":"https:\/\/server.hk\/cnblog\/167955\/"},"modified":"2024-11-06T08:18:24","modified_gmt":"2024-11-06T00:18:24","slug":"%e5%85%a9%e8%90%ac%e5%ad%97%e8%a9%b3%e8%a7%a3oracle%e5%88%86%e5%8d%80%e8%a1%a8%e6%8a%80%e8%a1%93%ef%bc%8c%e5%a4%aa%e9%a0%82%e4%ba%86","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/167955\/","title":{"rendered":"\u5169\u842c\u5b57\u8a73\u89e3Oracle\u5206\u5340\u8868\u6280\u8853\uff0c\u592a\u9802\u4e86"},"content":{"rendered":"<h1 id=\"%e5%85%a9%e8%90%ac%e5%ad%97%e8%a9%b3%e8%a7%a3oracle%e5%88%86%e5%8d%80%e8%a1%a8%e6%8a%80%e8%a1%93%ef%bc%8c%e5%a4%aa%e9%a0%82%e4%ba%86-wPzdPCHKgS\">\u5169\u842c\u5b57\u8a73\u89e3Oracle\u5206\u5340\u8868\u6280\u8853\uff0c\u592a\u9802\u4e86<\/h1>\n<p>\u5728\u6578\u64da\u5eab\u7ba1\u7406\u4e2d\uff0cOracle\u5206\u5340\u8868\u6280\u8853\u662f\u4e00\u9805\u91cd\u8981\u7684\u529f\u80fd\uff0c\u80fd\u5920\u6709\u6548\u5730\u63d0\u9ad8\u67e5\u8a62\u6027\u80fd\u548c\u6578\u64da\u7ba1\u7406\u7684\u9748\u6d3b\u6027\u3002\u672c\u6587\u5c07\u6df1\u5165\u63a2\u8a0eOracle\u5206\u5340\u8868\u7684\u6982\u5ff5\u3001\u512a\u52e2\u3001\u5be6\u73fe\u65b9\u5f0f\u53ca\u5176\u5728\u5be6\u969b\u61c9\u7528\u4e2d\u7684\u6848\u4f8b\uff0c\u5e6b\u52a9\u8b80\u8005\u5168\u9762\u7406\u89e3\u9019\u4e00\u6280\u8853\u3002<\/p>\n<h2 id=\"%e4%bb%80%e9%ba%bc%e6%98%aforacle%e5%88%86%e5%8d%80%e8%a1%a8%ef%bc%9f-wPzdPCHKgS\">\u4ec0\u9ebc\u662fOracle\u5206\u5340\u8868\uff1f<\/h2>\n<p>Oracle\u5206\u5340\u8868\u662f\u4e00\u7a2e\u5c07\u5927\u578b\u8868\u6216\u7d22\u5f15\u5283\u5206\u70ba\u66f4\u5c0f\u3001\u66f4\u6613\u65bc\u7ba1\u7406\u7684\u90e8\u5206\u7684\u6280\u8853\u3002\u6bcf\u500b\u90e8\u5206\u7a31\u70ba\u201c\u5206\u5340\u201d\uff0c\u9019\u4e9b\u5206\u5340\u53ef\u4ee5\u6839\u64da\u7279\u5b9a\u7684\u689d\u4ef6\uff08\u5982\u7bc4\u570d\u3001\u5217\u8868\u6216\u54c8\u5e0c\uff09\u9032\u884c\u5283\u5206\u3002\u9019\u6a23\u7684\u5283\u5206\u4e0d\u50c5\u80fd\u63d0\u9ad8\u67e5\u8a62\u6027\u80fd\uff0c\u9084\u80fd\u7c21\u5316\u6578\u64da\u7684\u7dad\u8b77\u548c\u7ba1\u7406\u3002<\/p>\n<h2 id=\"%e5%88%86%e5%8d%80%e8%a1%a8%e7%9a%84%e5%84%aa%e5%8b%a2-wPzdPCHKgS\">\u5206\u5340\u8868\u7684\u512a\u52e2<\/h2>\n<ul>\n<li><strong>\u6027\u80fd\u63d0\u5347\uff1a<\/strong>\u901a\u904e\u5c07\u67e5\u8a62\u9650\u5236\u5728\u7279\u5b9a\u7684\u5206\u5340\u4e2d\uff0cOracle\u80fd\u5920\u986f\u8457\u6e1b\u5c11\u9700\u8981\u6383\u63cf\u7684\u6578\u64da\u91cf\uff0c\u5f9e\u800c\u63d0\u9ad8\u67e5\u8a62\u901f\u5ea6\u3002<\/li>\n<li><strong>\u6578\u64da\u7ba1\u7406\u9748\u6d3b\u6027\uff1a<\/strong>\u5206\u5340\u8868\u5141\u8a31\u5c0d\u4e0d\u540c\u7684\u5206\u5340\u9032\u884c\u7368\u7acb\u7684\u7ba1\u7406\u64cd\u4f5c\uff0c\u4f8b\u5982\u53ef\u4ee5\u91dd\u5c0d\u67d0\u500b\u5206\u5340\u9032\u884c\u6578\u64da\u6e05\u7406\u6216\u5099\u4efd\uff0c\u800c\u4e0d\u5f71\u97ff\u6574\u500b\u8868\u3002<\/li>\n<li><strong>\u63d0\u9ad8\u53ef\u7528\u6027\uff1a<\/strong>\u5728\u67d0\u4e9b\u60c5\u6cc1\u4e0b\uff0c\u5206\u5340\u53ef\u4ee5\u88ab\u7368\u7acb\u5730\u4e0a\u7dda\u6216\u4e0b\u7dda\uff0c\u9019\u6a23\u53ef\u4ee5\u5728\u4e0d\u5f71\u97ff\u6574\u9ad4\u7cfb\u7d71\u53ef\u7528\u6027\u7684\u60c5\u6cc1\u4e0b\u9032\u884c\u7dad\u8b77\u3002<\/li>\n<li><strong>\u652f\u6301\u6578\u64da\u751f\u547d\u5468\u671f\u7ba1\u7406\uff1a<\/strong>\u5206\u5340\u8868\u53ef\u4ee5\u6839\u64da\u6578\u64da\u7684\u5e74\u9f61\u6216\u5176\u4ed6\u6a19\u6e96\u81ea\u52d5\u7ba1\u7406\u6578\u64da\u7684\u5b58\u5132\u548c\u522a\u9664\u3002<\/li>\n<\/ul>\n<h2 id=\"%e5%88%86%e5%8d%80%e8%a1%a8%e7%9a%84%e9%a1%9e%e5%9e%8b-wPzdPCHKgS\">\u5206\u5340\u8868\u7684\u985e\u578b<\/h2>\n<p>Oracle\u652f\u6301\u591a\u7a2e\u5206\u5340\u985e\u578b\uff0c\u4e3b\u8981\u5305\u62ec\uff1a<\/p>\n<ul>\n<li><strong>\u7bc4\u570d\u5206\u5340\uff08Range Partitioning\uff09\uff1a<\/strong>\u6839\u64da\u67d0\u500b\u5217\u7684\u503c\u7bc4\u570d\u5283\u5206\u6578\u64da\u3002\u4f8b\u5982\uff0c\u53ef\u4ee5\u6839\u64da\u65e5\u671f\u5c07\u6578\u64da\u5283\u5206\u70ba\u4e0d\u540c\u7684\u5e74\u4efd\u3002<\/li>\n<li><strong>\u5217\u8868\u5206\u5340\uff08List Partitioning\uff09\uff1a<\/strong>\u6839\u64da\u7279\u5b9a\u7684\u503c\u5217\u8868\u5283\u5206\u6578\u64da\u3002\u4f8b\u5982\uff0c\u53ef\u4ee5\u6839\u64da\u5730\u5340\u5c07\u6578\u64da\u5283\u5206\u70ba\u4e0d\u540c\u7684\u5206\u5340\u3002<\/li>\n<li><strong>\u54c8\u5e0c\u5206\u5340\uff08Hash Partitioning\uff09\uff1a<\/strong>\u6839\u64da\u54c8\u5e0c\u51fd\u6578\u7684\u7d50\u679c\u5283\u5206\u6578\u64da\uff0c\u9019\u6a23\u53ef\u4ee5\u5be6\u73fe\u5747\u52fb\u7684\u6578\u64da\u5206\u4f48\u3002<\/li>\n<li><strong>\u7d44\u5408\u5206\u5340\uff08Composite Partitioning\uff09\uff1a<\/strong>\u7d50\u5408\u591a\u7a2e\u5206\u5340\u65b9\u6cd5\uff0c\u4f8b\u5982\u5148\u6309\u7bc4\u570d\u5206\u5340\uff0c\u518d\u5728\u6bcf\u500b\u7bc4\u570d\u5167\u9032\u884c\u54c8\u5e0c\u5206\u5340\u3002<\/li>\n<\/ul>\n<h2 id=\"%e5%a6%82%e4%bd%95%e5%89%b5%e5%bb%ba%e5%88%86%e5%8d%80%e8%a1%a8-wPzdPCHKgS\">\u5982\u4f55\u5275\u5efa\u5206\u5340\u8868<\/h2>\n<p>\u5275\u5efa\u5206\u5340\u8868\u7684\u57fa\u672c\u8a9e\u6cd5\u5982\u4e0b\uff1a<\/p>\n<pre><code>CREATE TABLE table_name (\n    column1 datatype,\n    column2 datatype,\n    ...\n)\nPARTITION BY RANGE (column_name) (\n    PARTITION partition_name1 VALUES LESS THAN (value1),\n    PARTITION partition_name2 VALUES LESS THAN (value2),\n    ...\n);<\/code><\/pre>\n<p>\u4f8b\u5982\uff0c\u4ee5\u4e0b\u4ee3\u78bc\u5275\u5efa\u4e86\u4e00\u500b\u6309\u5e74\u4efd\u5206\u5340\u7684\u92b7\u552e\u6578\u64da\u8868\uff1a<\/p>\n<pre><code>CREATE TABLE sales (\n    sale_id NUMBER,\n    sale_date DATE,\n    amount NUMBER\n)\nPARTITION BY RANGE (sale_date) (\n    PARTITION p2021 VALUES LESS THAN (TO_DATE('2022-01-01', 'YYYY-MM-DD')),\n    PARTITION p2022 VALUES LESS THAN (TO_DATE('2023-01-01', 'YYYY-MM-DD'))\n);<\/code><\/pre>\n<h2 id=\"%e5%af%a6%e9%9a%9b%e6%87%89%e7%94%a8%e6%a1%88%e4%be%8b-wPzdPCHKgS\">\u5be6\u969b\u61c9\u7528\u6848\u4f8b<\/h2>\n<p>\u5728\u5be6\u969b\u61c9\u7528\u4e2d\uff0c\u8a31\u591a\u4f01\u696d\u5229\u7528Oracle\u5206\u5340\u8868\u6280\u8853\u4f86\u7ba1\u7406\u5176\u9f90\u5927\u7684\u6578\u64da\u96c6\u3002\u4f8b\u5982\uff0c\u4e00\u5bb6\u96fb\u5b50\u5546\u52d9\u516c\u53f8\u53ef\u80fd\u6703\u6839\u64da\u8a02\u55ae\u65e5\u671f\u5c07\u5176\u8a02\u55ae\u6578\u64da\u5283\u5206\u70ba\u4e0d\u540c\u7684\u5206\u5340\uff0c\u9019\u6a23\u5728\u67e5\u8a62\u7279\u5b9a\u6642\u9593\u7bc4\u570d\u5167\u7684\u8a02\u55ae\u6642\uff0c\u7cfb\u7d71\u53ea\u9700\u6383\u63cf\u76f8\u95dc\u7684\u5206\u5340\uff0c\u5f9e\u800c\u63d0\u9ad8\u67e5\u8a62\u6548\u7387\u3002<\/p>\n<h2 id=\"%e7%b8%bd%e7%b5%90-wPzdPCHKgS\">\u7e3d\u7d50<\/h2>\n<p>Oracle\u5206\u5340\u8868\u6280\u8853\u70ba\u6578\u64da\u5eab\u7ba1\u7406\u63d0\u4f9b\u4e86\u5f37\u5927\u7684\u652f\u6301\uff0c\u901a\u904e\u5408\u7406\u7684\u5206\u5340\u7b56\u7565\uff0c\u53ef\u4ee5\u986f\u8457\u63d0\u5347\u6027\u80fd\u548c\u7ba1\u7406\u6548\u7387\u3002\u7121\u8ad6\u662f\u5728\u6578\u64da\u67e5\u8a62\u9084\u662f\u6578\u64da\u7dad\u8b77\u65b9\u9762\uff0c\u5206\u5340\u8868\u90fd\u5c55\u73fe\u4e86\u5176\u7368\u7279\u7684\u512a\u52e2\u3002\u5c0d\u65bc\u9700\u8981\u8655\u7406\u5927\u91cf\u6578\u64da\u7684\u4f01\u696d\u4f86\u8aaa\uff0c\u638c\u63e1\u9019\u4e00\u6280\u8853\u7121\u7591\u662f\u63d0\u5347\u696d\u52d9\u6548\u7387\u7684\u91cd\u8981\u4e00\u6b65\u3002<\/p>\n<p>\u5982\u679c\u60a8\u5c0d\u65bc\u5982\u4f55\u5728\u60a8\u7684\u696d\u52d9\u4e2d\u5be6\u65bd\u9019\u4e9b\u6280\u8853\u6709\u8208\u8da3\uff0c\u6216\u8005\u9700\u8981\u9ad8\u6548\u7684 <a href=\"https:\/\/server.hk\">VPS<\/a> \u89e3\u6c7a\u65b9\u6848\u4f86\u652f\u6301\u60a8\u7684\u6578\u64da\u5eab\u904b\u884c\uff0c\u8acb\u96a8\u6642\u8a2a\u554f\u6211\u5011\u7684\u7db2\u7ad9\u4ee5\u7372\u53d6\u66f4\u591a\u4fe1\u606f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6df1\u5165\u63a2\u8a0eOracle\u5206\u5340\u8868\u6280\u8853\uff0c\u63d0\u4f9b\u5169\u842c\u5b57\u8a73\u89e3\uff0c\u52a9\u4f60\u638c\u63e1\u9ad8\u6548\u6578\u64da\u7ba1\u7406\u7684\u95dc\u9375\u6280\u5de7\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-167955","post","type-post","status-publish","format-standard","hentry","category-database"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/167955","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=167955"}],"version-history":[{"count":1,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/167955\/revisions"}],"predecessor-version":[{"id":167956,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/167955\/revisions\/167956"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=167955"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=167955"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=167955"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}