﻿{"id":1803,"date":"2020-08-25T16:28:33","date_gmt":"2020-08-25T08:28:33","guid":{"rendered":"http:\/\/www.llku.com\/?p=1803"},"modified":"2020-08-25T16:28:33","modified_gmt":"2020-08-25T08:28:33","slug":"oracle%e4%bc%98%e5%8c%96%e6%9f%a5%e8%af%a2%e8%b5%84%e6%ba%90%e6%b6%88%e8%80%97%e7%9a%84%e8%af%ad%e5%8f%a5","status":"publish","type":"post","link":"https:\/\/www.llku.com\/?p=1803","title":{"rendered":"ORACLE\u4f18\u5316\u67e5\u8be2\u8d44\u6e90\u6d88\u8017\u7684\u8bed\u53e5"},"content":{"rendered":"<p>1\u3001SQL ordered by Gets<br \/>\nselect *<br \/>\nfrom (select substr(sql_text, 1, 40) sql,<br \/>\nbuffer_gets,<br \/>\nexecutions,<br \/>\nbuffer_gets \/ executions &#8220;Gets\/Exec&#8221;,<br \/>\nhash_value,<br \/>\naddress<br \/>\nfrom v$sqlarea<br \/>\nwhere buffer_gets &gt; 0<br \/>\nand executions &gt; 0<br \/>\norder by buffer_gets desc)<br \/>\nwhere rownum &lt;= 10;<\/p>\n<p>2\u3001SQL ordered by Reads<br \/>\nselect *<br \/>\nfrom (select substr(sql_text, 1, 40) sql,<br \/>\ndisk_reads,<br \/>\nexecutions,<br \/>\ndisk_reads \/ executions &#8220;Reads\/Exec&#8221;,<br \/>\nhash_value,<br \/>\naddress<br \/>\nfrom v$sqlarea<br \/>\nwhere disk_reads &gt; 0<br \/>\nand executions &gt; 0<br \/>\norder by disk_reads desc)<br \/>\nwhere rownum &lt;= 10;<\/p>\n<p>3\u3001SQL ordered by Executions<br \/>\nselect *<br \/>\nfrom (select substr(sql_text, 1, 40) sql,<br \/>\nexecutions,<br \/>\nrows_processed,<br \/>\nrows_processed \/ executions &#8220;Rows\/Exec&#8221;,<br \/>\nhash_value,<br \/>\naddress<br \/>\nfrom v$sqlarea<br \/>\nwhere executions &gt; 0<br \/>\norder by executions desc)<br \/>\nwhere rownum &lt;= 10;<\/p>\n<p>4\u3001SQL ordered by Parse Calls<br \/>\nselect *<br \/>\nfrom (select substr(sql_text, 1, 40) sql,<br \/>\nparse_calls,<br \/>\nexecutions,<br \/>\nhash_value,<br \/>\naddress<br \/>\nfrom v$sqlarea<br \/>\nwhere parse_calls &gt; 0<br \/>\norder by parse_calls desc)<br \/>\nwhere rownum &lt;= 10;<\/p>\n<p>5\u3001Running Time top 10 sql<br \/>\nselect *<br \/>\nfrom (select t.sql_fulltext,<br \/>\n(t.last_active_time &#8211;<br \/>\nto_date(t.first_load_time, \u2018yyyy &#8211; mm &#8211; dd hh24 :mi :ss\u2018)) * 24 * 60,<br \/>\ndisk_reads,<br \/>\nbuffer_gets,<br \/>\nrows_processed,<br \/>\nt.last_active_time,<br \/>\nt.last_load_time,<br \/>\nt.first_load_time<br \/>\nfrom v$sqlarea t<br \/>\norder by t.first_load_time desc)<br \/>\nwhere rownum &lt; 10;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>1\u3001SQL ordered by Gets select * from (select substr(sql_ &hellip; <a href=\"https:\/\/www.llku.com\/?p=1803\" class=\"more-link\">\u7ee7\u7eed\u9605\u8bfb<span class=\"screen-reader-text\">ORACLE\u4f18\u5316\u67e5\u8be2\u8d44\u6e90\u6d88\u8017\u7684\u8bed\u53e5<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[69,269],"_links":{"self":[{"href":"https:\/\/www.llku.com\/index.php?rest_route=\/wp\/v2\/posts\/1803"}],"collection":[{"href":"https:\/\/www.llku.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.llku.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.llku.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.llku.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1803"}],"version-history":[{"count":1,"href":"https:\/\/www.llku.com\/index.php?rest_route=\/wp\/v2\/posts\/1803\/revisions"}],"predecessor-version":[{"id":1804,"href":"https:\/\/www.llku.com\/index.php?rest_route=\/wp\/v2\/posts\/1803\/revisions\/1804"}],"wp:attachment":[{"href":"https:\/\/www.llku.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1803"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.llku.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1803"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.llku.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1803"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}