{"id":3953,"date":"2018-06-18T13:13:12","date_gmt":"2018-06-18T04:13:12","guid":{"rendered":"http:\/\/haisins.epac.to\/wordpress\/?p=3953"},"modified":"2018-06-18T13:13:59","modified_gmt":"2018-06-18T04:13:59","slug":"book-script-%ea%b3%84%ed%9a%8d-%eb%90%9c-plan-%ed%99%95%ec%9d%b8-%ed%95%98%eb%8a%94-%ec%bf%bc%eb%a6%ac","status":"publish","type":"post","link":"http:\/\/haisins.synology.me\/wordpress\/?p=3953","title":{"rendered":"[Book Script] SQL ID \ubcc4 \uc608\uc0c1 PLAN \ud655\uc778 \ud558\ub294 \ucffc\ub9ac"},"content":{"rendered":"<ol>\n<li>\uba3c\uc800 \uc870\ud68c \ud574\uc57c \ud558\ub294 sql id \uc758 Child Number \ub97c \ud655\uc778 \ud569\ub2c8\ub2e4.<\/li>\n<\/ol>\n<pre class=\"lang:plsql decode:true \">select sql_id,\r\n  PARSING_SCHEMA_NAME \"USER\",\r\n  PLAN_HASH_VALUE,\r\n  OPTIMIZER_MODE,\r\n  child_number,\r\n  parse_calls,\r\n  USERS_OPENING,\r\n  USERS_EXECUTING,\r\n  loads,\r\n  executions,\r\n  invalidations,\r\n  decode(sign(invalidations), 1, (loads-invalidations), 0) reloads,\r\n  FIRST_LOAD_TIME,\r\n  LAST_LOAD_TIME\r\nfrom v$sql \r\nwhere sql_id='&amp;&amp;sql_id'\r\nand  sql_text not like '%v$sql%';\r\n\r\n<\/pre>\n<p>2. SQL ID \uc640 Child Number \ub97c \ub123\uc5b4 \ud574\ub2f9 SQL\uc758 \uc608\uc815\ub41c Plan\uc744 \ud655\uc778 \ud569\ub2c8\ub2e4.<\/p>\n<p>&nbsp;<\/p>\n<pre class=\"lang:plsql decode:true \" >select * from table(dbms_xplan.display_cursor('&amp;&amp;sql_id', &amp;&amp;child_number, 'ALLSTATS LAST')) ;<\/pre>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\uba3c\uc800 \uc870\ud68c \ud574\uc57c \ud558\ub294 sql id \uc758 Child Number \ub97c \ud655\uc778 \ud569\ub2c8\ub2e4. select sql_id, PARSING_SCHEMA_NAME &#8220;USER&#8221;, PLAN_HASH_VALUE, OPTIMIZER_MODE, child_number, parse_calls, USERS_OPENING, USERS_EXECUTING, loads, executions, invalidations, decode(sign(invalidations), 1, (loads-invalidations), 0) reloads, FIRST_LOAD_TIME, LAST_LOAD_TIME from v$sql where sql_id=&#8217;&amp;&amp;sql_id&#8217; and sql_text not like &#8216;%v$sql%&#8217;; 2. SQL ID \uc640 Child Number \ub97c \ub123\uc5b4 \ud574\ub2f9 SQL\uc758 \uc608\uc815\ub41c Plan\uc744 \ud655\uc778 \ud569\ub2c8\ub2e4. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":2856,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"spay_email":""},"categories":[1094],"tags":[1096,71,159],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/haisins.synology.me\/wordpress\/wp-content\/uploads\/2018\/02\/oracle-cloud-logo.png?fit=300%2C194","amp_enabled":true,"_links":{"self":[{"href":"http:\/\/haisins.synology.me\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/3953"}],"collection":[{"href":"http:\/\/haisins.synology.me\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/haisins.synology.me\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/haisins.synology.me\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/haisins.synology.me\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3953"}],"version-history":[{"count":2,"href":"http:\/\/haisins.synology.me\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/3953\/revisions"}],"predecessor-version":[{"id":3955,"href":"http:\/\/haisins.synology.me\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/3953\/revisions\/3955"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/haisins.synology.me\/wordpress\/index.php?rest_route=\/wp\/v2\/media\/2856"}],"wp:attachment":[{"href":"http:\/\/haisins.synology.me\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3953"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/haisins.synology.me\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3953"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/haisins.synology.me\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3953"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}