{"id":423,"date":"2015-09-02T08:37:39","date_gmt":"2015-09-02T08:37:39","guid":{"rendered":"http:\/\/haisins.epac.to\/wordpress\/?p=423"},"modified":"2015-09-02T08:37:39","modified_gmt":"2015-09-02T08:37:39","slug":"cpu%eb%b6%80%ed%95%98-%ea%b8%89%ec%a6%9d-sql-%ec%b0%be%ea%b8%b0","status":"publish","type":"post","link":"http:\/\/haisins.synology.me\/wordpress\/?p=423","title":{"rendered":"CPU\ubd80\ud558 \uae09\uc99d SQL \ucc3e\uae30"},"content":{"rendered":"<p>clear screen<\/p>\n<p>set verify &nbsp;off<\/p>\n<p>set pagesize 200<\/p>\n<p>set linesize 110<\/p>\n<p>set embedded off<\/p>\n<p>set feedback off<\/p>\n<p>col col0 format a25 heading &#8220;Sid-Serial&#8221;<\/p>\n<p>col col1 format a10 heading &#8220;UserName&#8221;<\/p>\n<p>col col2 format a10 heading &#8220;Schema&#8221;<\/p>\n<p>col col3 format a10 heading &#8220;OsUser&#8221;<\/p>\n<p>col col4 format a10 heading &#8220;Process&#8221;<\/p>\n<p>col col5 format a10 heading &#8220;Machine&#8221;<\/p>\n<p>col col6 format a10 heading &#8220;Terminal&#8221;<\/p>\n<p>col col7 format a20 heading &#8220;Program&#8221;<\/p>\n<p>col col8 format 9 heading &#8220;Piece&#8221;<\/p>\n<p>col col9 format a8 heading &#8220;Status&#8221;<\/p>\n<p>col col10 format a64 heading &#8220;SQL&#8221;<\/p>\n<p>!rm -f .\/cpu_overhead.lst<\/p>\n<p>spool cpu_overhead.lst<\/p>\n<p>Select A.sid||&#8217;,&#8217;||A.serial# col0,<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp;A.username col1,<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp;A.schemaname col2,<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp;A.osuser col3,<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp;A.process col4,<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp;A.machine col5,<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp;A.Terminal col6,<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp;upper(A.program) col7,<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp;C.piece col8,<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp;A.status col9,<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp;C.sql_text col10<\/p>\n<p>&nbsp; From v$session A, v$process B, v$sqltext C<\/p>\n<p>&nbsp;Where B.spid = &#8216;&amp;1&#8217;<\/p>\n<p>&nbsp; &nbsp;and A.paddr = B.addr<\/p>\n<p>&nbsp; &nbsp;and C.address = A.sql_address<\/p>\n<p>order by C.piece;<\/p>\n<p>spool off<\/p>\n","protected":false},"excerpt":{"rendered":"<p>clear screen set verify &nbsp;off set pagesize 200 set linesize 110 set embedded off set feedback off col col0 format a25 heading &#8220;Sid-Serial&#8221; col col1 format a10 heading &#8220;UserName&#8221; col col2 format a10 heading &#8220;Schema&#8221; col col3 format a10 heading &#8220;OsUser&#8221; col col4 format a10 heading &#8220;Process&#8221; col col5 format a10 heading &#8220;Machine&#8221; col col6 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"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":[3],"tags":[177,178],"jetpack_featured_media_url":"","amp_enabled":true,"_links":{"self":[{"href":"http:\/\/haisins.synology.me\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/423"}],"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=423"}],"version-history":[{"count":0,"href":"http:\/\/haisins.synology.me\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/423\/revisions"}],"wp:attachment":[{"href":"http:\/\/haisins.synology.me\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=423"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/haisins.synology.me\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=423"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/haisins.synology.me\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=423"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}