{"id":5355,"date":"2024-11-14T13:31:03","date_gmt":"2024-11-14T05:31:03","guid":{"rendered":"https:\/\/fwq.ai\/blog\/5355\/"},"modified":"2024-11-14T13:31:03","modified_gmt":"2024-11-14T05:31:03","slug":"oracle%e9%87%8d%e5%bb%ba%e7%b4%a2%e5%bc%95%e6%80%8e%e4%b9%88%e7%9c%8b","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/5355\/","title":{"rendered":"oracle\u91cd\u5efa\u7d22\u5f15\u600e\u4e48\u770b"},"content":{"rendered":"<p><strong>\u91cd\u5efa\u7d22\u5f15\u7684\u67e5\u770b\u65b9\u6cd5<\/strong><\/p>\n<p>\u91cd\u5efa\u7d22\u5f15\u662f\u4f18\u5316Oracle\u6570\u636e\u5e93\u6027\u80fd\u7684\u5173\u952e\u4efb\u52a1\u3002\u8981\u4e86\u89e3\u5982\u4f55\u67e5\u770bOracle\u4e2d\u7d22\u5f15\u662f\u5426\u5df2\u91cd\u5efa\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u65b9\u6cd5\uff1a<\/p>\n<p><strong>1. \u4f7f\u7528DBA_INDEXES\u89c6\u56fe<\/strong><\/p>\n<pre>SELECT * FROM DBA_INDEXES\nWHERE OWNER = 'YOUR_SCHEMA_NAME'\nAND INDEX_NAME = 'YOUR_INDEX_NAME';<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u8f93\u51fa\u7ed3\u679c\u5c06\u5305\u542b\u5173\u4e8e\u7d22\u5f15\u7684\u4fe1\u606f\uff0c\u5305\u62ec\uff1a<\/p>\n<ul>\n<li> <strong>REBUILT:<\/strong> \u8868\u660e\u7d22\u5f15\u662f\u5426\u5df2\u91cd\u5efa\u3002\u503c\u4e3a&#8217;YES&#8217;\u8868\u793a\u5df2\u91cd\u5efa\u3002<\/li>\n<li> <strong>LAST_ANALYZED:<\/strong> \u6307\u793a\u7d22\u5f15\u4e0a\u6b21\u5206\u6790\u7684\u65f6\u95f4\u3002<\/li>\n<li> <strong>LAST_REBUILD:<\/strong> \u6307\u793a\u7d22\u5f15\u4e0a\u6b21\u91cd\u5efa\u7684\u65f6\u95f4\u3002<\/li>\n<\/ul>\n<p><strong>2. \u4f7f\u7528ALL_INDEXES\u89c6\u56fe<\/strong><\/p>\n<pre>SELECT * FROM ALL_INDEXES\nWHERE OWNER = 'YOUR_SCHEMA_NAME'\nAND INDEX_NAME = 'YOUR_INDEX_NAME';<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u8f93\u51fa\u7ed3\u679c\u4e0eDBA_INDEXES\u89c6\u56fe\u76f8\u4f3c\uff0c\u4f46\u8fd8\u5305\u62ec\u5176\u4ed6\u4fe1\u606f\uff0c\u4f8b\u5982\uff1a<\/p>\n<ul>\n<li> <strong>STATUS:<\/strong> \u8868\u660e\u7d22\u5f15\u7684\u72b6\u6001\uff0c\u4f8b\u5982&#8217;VALID&#8217;\u6216&#8217;UNUSABLE&#8217;\u3002<\/li>\n<\/ul>\n<p><strong>3. \u4f7f\u7528V$INDEX_STATISTICS\u89c6\u56fe<\/strong><\/p>\n<pre>SELECT * FROM V$INDEX_STATISTICS\nWHERE OWNER = 'YOUR_SCHEMA_NAME'\nAND INDEX_NAME = 'YOUR_INDEX_NAME';<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u8f93\u51fa\u7ed3\u679c\u5c06\u5305\u542b\u6709\u5173\u7d22\u5f15\u7edf\u8ba1\u7684\u4fe1\u606f\uff0c\u5305\u62ec\uff1a<\/p>\n<ul>\n<li> <strong>NUM_REBUILDS:<\/strong> \u6307\u793a\u7d22\u5f15\u5df2\u91cd\u5efa\u7684\u6b21\u6570\u3002<\/li>\n<\/ul>\n<p>\u8fd9\u4e9b\u65b9\u6cd5\u4f7f\u60a8\u53ef\u4ee5\u8f7b\u677e\u5730\u67e5\u770bOracle\u6570\u636e\u5e93\u4e2d\u7d22\u5f15\u7684\u91cd\u5efa\u72b6\u6001\uff0c\u5e76\u5e2e\u52a9\u60a8\u6839\u636e\u9700\u8981\u51b3\u5b9a\u662f\u5426\u9700\u8981\u91cd\u5efa\u7d22\u5f15\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u91cd\u5efa\u7d22\u5f15\u600e\u4e48\u770b\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u7f51\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u91cd\u5efa\u7d22\u5f15\u7684\u67e5\u770b\u65b9\u6cd5 \u91cd\u5efa\u7d22\u5f15\u662f\u4f18\u5316Oracle\u6570\u636e\u5e93\u6027\u80fd\u7684\u5173\u952e\u4efb\u52a1\u3002\u8981\u4e86\u89e3\u5982\u4f55\u67e5\u770bOracle\u4e2d\u7d22\u5f15\u662f\u5426\u5df2\u91cd\u5efa\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u65b9\u6cd5\uff1a 1. \u4f7f\u7528DBA_INDEXES\u89c6\u56fe SELECT * FROM DBA_INDEXES WHERE OWNER = &#8216;YOUR_SCHEMA_NAME&#8217; AND INDEX_NAME = &#8216;YOUR_INDEX_NAME&#8217;; \u767b\u5f55\u540e\u590d\u5236 \u8f93\u51fa\u7ed3\u679c\u5c06\u5305\u542b\u5173\u4e8e\u7d22\u5f15\u7684\u4fe1\u606f\uff0c\u5305\u62ec\uff1a REBUILT: \u8868\u660e\u7d22\u5f15\u662f\u5426\u5df2\u91cd\u5efa\u3002\u503c\u4e3a&#8217;YES&#8217;\u8868\u793a\u5df2\u91cd\u5efa\u3002 LAST_ANALYZED: \u6307\u793a\u7d22\u5f15\u4e0a\u6b21\u5206\u6790\u7684\u65f6\u95f4\u3002 LAST_REBUILD: \u6307\u793a\u7d22\u5f15\u4e0a\u6b21\u91cd\u5efa\u7684\u65f6\u95f4\u3002 2. \u4f7f\u7528ALL_INDEXES\u89c6\u56fe SELECT * FROM ALL_INDEXES WHERE OWNER = &#8216;YOUR_SCHEMA_NAME&#8217; AND INDEX_NAME = &#8216;YOUR_INDEX_NAME&#8217;; \u767b\u5f55\u540e\u590d\u5236 \u8f93\u51fa\u7ed3\u679c\u4e0eDBA_INDEXES\u89c6\u56fe\u76f8\u4f3c\uff0c\u4f46\u8fd8\u5305\u62ec\u5176\u4ed6\u4fe1\u606f\uff0c\u4f8b\u5982\uff1a STATUS: \u8868\u660e\u7d22\u5f15\u7684\u72b6\u6001\uff0c\u4f8b\u5982&#8217;VALID&#8217;\u6216&#8217;UNUSABLE&#8217;\u3002 3. \u4f7f\u7528V$INDEX_STATISTICS\u89c6\u56fe SELECT * FROM V$INDEX_STATISTICS WHERE OWNER = &#8216;YOUR_SCHEMA_NAME&#8217; AND INDEX_NAME = [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-5355","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/5355","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=5355"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/5355\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=5355"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=5355"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=5355"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}