{"id":416,"date":"2015-08-31T08:03:46","date_gmt":"2015-08-31T08:03:46","guid":{"rendered":"http:\/\/haisins.epac.to\/wordpress\/?p=416"},"modified":"2015-08-31T08:03:46","modified_gmt":"2015-08-31T08:03:46","slug":"%ec%98%a4%eb%9d%bc%ed%81%b4-db-%ec%84%9c%eb%b2%84%ec%9d%98-cpu-%ec%86%8c%eb%aa%a8","status":"publish","type":"post","link":"http:\/\/haisins.synology.me\/wordpress\/?p=416","title":{"rendered":"\uc624\ub77c\ud074 DB \uc11c\ubc84\uc758 CPU \uc18c\ubaa8"},"content":{"rendered":"<p><\/p>\n<p>\uc624\ub77c\ud074 DB \uc11c\ubc84\uc758 CPU \uc18c\ubaa8\uc758 \uc6d0\uc778&#8230;<\/p>\n<p>&nbsp;<\/p>\n<p>1. CPU\uc18c\ubaa8\uc758 \uc8fc\uc6d0\uc778<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp; &nbsp; &#8211; CPU\uc18c\ubaa8\uc758 \uc8fc\uc694\uc778\uc740 \uc8fc\ub85c \uc798\ubabb \uc9dc\uc5ec\uc9c4 SQL\ub85c \uc778\ud574 \ubc1c\uc0dd\ud55c\ub2e4. \uc5b4\ub5a4 SQL\uc774 CPU\uc758 \uc790\uc6d0\uc744 \uc798\ubabb \uc0ac\uc6a9\ud558\uc5ec \uc790\uc6d0\uc744 \uc18c\ubaa8\ud558\ub294\uc9c0\ub97c \uc54c \uc218 \uc788\ub2e4\uba74,&nbsp;<\/p>\n<p>\ud574\ub2f9 SQL\ub9cc \ud29c\ub2dd\ud558\uc5ec \uc0ac\uc6a9\ud558\uba74 \ubb38\uc81c\ub294 \uc27d\uac8c \ud574\uacb0\uc774 \ub420 \uac83\uc774\ub2e4.&nbsp;<\/p>\n<p>\uadf8\ub7ec\ub098 \uc774 \uc6d0\uc778\uc774 \uac1c\ubcc4\uc801\uc778 SQL\ubb38\uc7a5\uc774 \uc544\ub2c8\uace0 DBMS\ucc28\uc6d0\uc5d0\uc11c\uc758 \ubb38\uc81c\ub77c\uba74 \uc774\uc57c\uae30\ub294 \ub610 \ub2ec\ub77c\uc9c4\ub2e4. \ud558\uc5ec DBMS\ucc28\uc6d0\uc5d0\uc11c \ub9ce\uc774 \ubc1c\uc0dd\ud558\ub294 CPU\uc790\uc6d0\uc758 \uc18c\ubaa8\uc5d0 \ub300\ud574 \ub2e4\uc74c\uacfc \uac19\uc774 \uc54c\uc544\ubcf4\uc790.<\/p>\n<p>&nbsp;<\/p>\n<p><b>&nbsp; &nbsp; &nbsp; 1) Reparsing<\/b><\/p>\n<p><b>&nbsp; &nbsp; &nbsp; 2) \uc798\ubabb \uc124\uacc4\ub41c Object<\/b><\/p>\n<p><b>&nbsp; &nbsp; &nbsp; 3) Wait Event<\/b><\/p>\n<p><b>&nbsp; &nbsp; &nbsp; 4) Latch Contention<\/b><\/p>\n<p><b>&nbsp; &nbsp; &nbsp; 5) \uc77d\uae30 \uc77c\uad00\uc131<\/b><\/p>\n<p>&nbsp;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<\/p>\n<p>&nbsp; &nbsp;1) \uc798\ubabb \uc9dc\uc5ec\uc9c4 SQL<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp;: CPU\ub97c \uc18c\ubaa8\ud558\ub294 \ud2b9\uc815 SQL\uc744 \ud30c\uc545\ud558\ub294 \uac83\uc774 \uac00\ub2a5\ud558\ub2e4\uba74, \ud574\ub2f9 SQL\ubb38\uc774 \ubc18\ub4dc\uc2dc \uc6b0\uc120\uc801\uc73c\ub85c<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\ud29c\ub2dd\ub418\uc5b4\uc57c \ud55c\ub2e4. \uc798\ubabb \uc9dc\uc5ec\uc9c4 SQL\ubb38\uc740 CPU\uc790\uc6d0 \ubfd0\ub9cc \uc544\ub2c8\ub77c, \uae30\ud0c0 \ub2e4\ub978 \uc5ec\ub7ec \uc790\uc6d0\ub4e4\uc758<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\uc18c\ubaa8 \ub610\ud55c \ub9e4\uc6b0 \ub9ce\uc774 \ubc1c\uc0dd\uc2dc\ud0a4\uae30 \ub54c\ubb38\uc774\ub2e4.<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp; 2) Reparsing<\/p>\n<p>&nbsp; &nbsp; &nbsp;<\/p>\n<p>&nbsp; &nbsp; &nbsp; : Oracle\uc774 SQL\ubb38\uc744 \uc218\ud589\ud560 \ub54c\ub294 syntax<\/p>\n<p>&nbsp; &nbsp; &nbsp;<\/p>\n<p>&nbsp; &nbsp; &nbsp; : Oracle\uc774 SQL\ubb38\uc744 \uc218\ud589\ud560 \ub54c\ub294 syntax\uc640 semantics\uac00 \uc801\uc808\ud558\uac8c \uc791\uc131\ub418\uc5c8\ub294\uc9c0\ub97c \ud30c\uc545\ud558\ub294<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; Parse\uacfc\uc815\uc744 \uac70\uce58\uac8c \ub41c\ub2e4.\uc774 \uacfc\uc815\uc5d0\uc11c \ub9ce\uc740 CPU\uac00 \uc18c\ubaa8\ub420 \uc218 \uc788\ub2e4. \ud55c \ubc88 parse\ub418\uba74, &nbsp; &nbsp;&nbsp;<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; parsing\ub41c \uc815\ubcf4\uac00 \uba54\ubaa8\ub9ac\uc5d0 \uc0ac\ub77c\uc9c0\uae30 \uc804\uae4c\uc9c0\ub294 \ub3d9\uc77c\ud55c SQL\ubb38\uc5d0 \ub300\ud574\uc11c\ub294 \ub354 \uc774\uc0c1 parse<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp;\ud558\uc9c0 \uc54a\ub294\ub2e4. \ub530\ub77c\uc11c \ubd80\uc801\uc808\ud558\uac8c \uba54\ubaa8\ub9ac\uac00 \uc0ac\uc6a9\ub418\uba74, \uc4f8\ub370\uc5c6\ub294 reparsing\uc774 \ub9ce\uc774 \ubc1c\uc0dd\ud558\uac8c<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp;\ub41c\ub2e4. \ub2e4\uc74c \uc808\ucc28\ub97c \ud1b5\ud574\uc11c reparsing\uc774 \uc77c\uc5b4\ub098\uace0 \uc788\ub294\uc9c0 \ud655\uc778\ud574 \ubcf8\ub2e4.<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp;&#8211; v$sysstat\ub97c \ud1b5\ud574\uc11c parse\uad00\ub828 \uc815\ubcf4\ub97c \uc870\ud68c<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SELECT * FROM V$SYSSTAT<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; WHERE NAME IN ( &#8216;parse time cpu&#8217;,&#8217;parse time elapsed&#8217;,&#8217;parse count(hard)&#8217;,<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#8216;CPU used by this session&#8217; );<\/p>\n<p><\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;parsing\uc5d0 \uac78\ub9ac\ub294 \uc2dc\uac04\uc774 \uc5bc\ub9c8\uc778\uc9c0\ub97c \uc54c\uc544\ubcfc \uc218 \uc788\ub2e4. Application\uc774 parsing\uc744 \ub9ce\uc774 \ud560<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\uc218\ub85d Contention\uc774 \ub9ce\uc774 \ubc1c\uc0dd\ud558\uace0, System\uc774 \ub9ce\uc740 \uc2dc\uac04\uc744 \ub300\uae30\ud558\uac8c \ub41c\ub2e4. \ub9cc\uc57d\uc5d0<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;parse time cpu\uac00 cpu\uc758 \ub9ce\uc740 \ubd80\ubd84\uc744 \ucc28\uc9c0\ud558\uace0 \uc788\ub2e4\uba74, \ub300\ubd80\ubd84\uc758 \uc2dc\uac04\uc744 parsing\ud558\ub294\ub370<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\uc18c\ubaa8\ud558\uace0 \uc788\ub2e4\ub294 \uc758\ubbf8\uc774\ub2e4. \uc774\ub7ec\ud55c \uacbd\uc6b0\uc5d0\ub294 Application\uc774 Literal SQL\uc744 \ub9ce\uc774 \uc0ac\uc6a9\ud574\uc11c<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\uacf5\uc720\ub418\uc5b4\uc11c \uc0ac\uc6a9\ub418\uc9c0 \ubabb\ud558\uace0 \uc788\uac70\ub098, shared pool\uc774 \uc798\ubabb \uad6c\uc131\ub418\uc5b4 \uc788\ub2e4\ub294 \uc758\ubbf8\uc774\ub2e4.<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\uc790\ubc14\uc758 \uacbd\uc6b0 PrepareStatement\ubb38\uc7a5\uc744 \uc774\uc6a9\ud558\uc9c0 \uc54a\uc544\uc11c \ubc1c\uc0dd\ud560 \uc218 \uc788\ub2e4.<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp;&#8211; v$sqlarea\ub97c \uc870\ud68c\ud574\uc11c \uc790\uc8fc Parsing\ub418\ub294 SQL\ubb38 \ucc3e\uae30<\/p>\n<p>&nbsp;&nbsp;<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; select sql_text,parse_calls, executions<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; from &nbsp; &nbsp;v$sqlarea<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; order by parse_calls;<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; parse call\uc774 \ub9ce\uc774 \ubc1c\uc0dd\ud558\ub294 SQL\ubb38\uc7a5\uc744 \ud29c\ub2dd\ud55c\ub2e4. \ub9cc\uc57d parse time CPU\uac00 \uc804\uccb4 CPU<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \uc0ac\uc6a9\ub7c9\ubcf4\ub2e4 \uc801\uc740 \ubd80\ubd84\uc744 \ucc28\uc9c0 \ud55c\ub2e4\uba74, CPU\uac00 \uc5b4\ub290 \ubd80\ubd84\uc5d0\uc11c \ub9ce\uc774 \uc18c\ubaa8\ub418\ub294\uc9c0 \ud30c\uc545\ud574\uc57c<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \ud55c\ub2e4. \ub2e4\uc74c\uacfc \uac19\uc740 \uc808\ucc28\ub97c \ud1b5\ud574\uc11c \uc774\ub7ec\ud55c \ubd80\ubd84\uc744 \ud30c\uc545\ud560 \uc218 \uc788\ub2e4.<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (1) Buffer Gets\uac00 \ub9ce\uc774 \ubc1c\uc0dd\ud558\ub294 SQL\ubb38 \ucc3e\uae30<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\ub2e4\uc74c\uc758 SQL\uc744 \ud1b5\ud574\uc11c Database Buffer\ub97c \ub9ce\uc774 access\ud558\ub294 SQL\ubb38\uc744 \ucc3e\uc544 \ubcfc \uc218 \uc788\ub2e4.<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;select address,<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;hash_value,<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;buffer_gets,<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;executions,<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;buffer_gets\/executions &#8220;gets\/exec&#8221;,<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;sql_text<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;from &nbsp; &nbsp;v$sqlarea<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;where &nbsp;buffer_gets &gt; 50000<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;and &nbsp; &nbsp;executions &gt; 0<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;order by buffer_gets;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\uc704\uc758 \ubb38\uc7a5\uc744 \ud1b5\ud558\uc5ec\uc11c execution \ud69f\uc218\uac00 \ub9ce\uc774 \ubc1c\uc0dd\ud558\uba74\uc11c, execution\ub2f9 buffer_gets\uac00<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\ub9ce\uc774 \ubc1c\uc0dd\ud558\ub294 SQL\ubb38\uc774 \uc5b4\ub5a4 \uac83\uc778\uc9c0 \uc54c\uc544 \ubcfc \uc218 \uc788\ub2e4.<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;(2) \uc704 \ucffc\ub9ac\ub97c \ud1b5\ud574\uc11c \uc870\uc0ac\ub418\uc5b4\uc57c \ud560 SQL\ubb38\uc774 \uc5b4\ub5a4 SQL\ubb38\uc778\uc9c0\ub97c \ud655\uc778\ud55c \ud6c4\uc5d0, \uc704\uc5d0\uc11c \uad6c<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \ud55c address\uc640 Hash Value\ub97c \ud1b5\ud574\uc11c \uc804\uccb4 SQL\ubb38\uc7a5 \uc870\ud68c<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; select &nbsp; sql_text from v$sqltext<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; where &nbsp; address=&#8217;&amp;address_wanted&#8217;<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; and &nbsp; &nbsp; &nbsp; hash_value=&amp;hash_value<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; order by piece;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \uc774\ub807\uac8c \uad6c\ud55c SQL\ubb38\uc740 Explain plan\ub4f1\uc744 \uc774\uc6a9\ud574\uc11c \uc2e4\uc81c\ub85c \uc774 SQL\uc774 CPU\ub97c \ub9ce\uc774 \uc18c\ubaa8<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \ud558\ub294 SQL\uc778\uc9c0\ub97c \ud655\uc778\ud574 \ubcf8\ub2e4. \ub9cc\uc57d Bind Variable\uc744 \uc0ac\uc6a9\ud558\ub294 \ub370\ub3c4 \ubd80\ud558\uac00 \ud06c\ub2e4\uba74,<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \uc774 SQL\ubb38\uc740 \ud2b9\uc815 Bind Variable\uc5d0 \ub300\ud574\uc11c\ub9cc \ub9ce\uc740 CPU\ub97c \uc0ac\uc6a9\ud558\ub294 \uac83\uc740 \uc544\ub2cc\uc9c0<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \ud655\uc778\ud574 \ubcf8\ub2e4.<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (3) \ub300\ubd80\ubd84\uc758 CPU\ub97c \uc18c\ubaa8\ud558\ub294 session\uc774 \uc5b4\ub5a4 session\uc778\uc9c0 \ud30c\uc545\ud574\ubcf8\ub2e4.<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; select &nbsp;v.sid,<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; substr(s.name,1,30) &#8220;statistic&#8221;,<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; v.value<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; from &nbsp; &nbsp;v$statname s, v$sesstat v<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; where s.name = &#8216;CPU used by this session&#8217;<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; and &nbsp; &nbsp;v.statistic# = s.statistic#<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; and &nbsp; &nbsp;v.value &gt; 0<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; order &nbsp;by 3;<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Database\uc5d0\uc11c \ub098\ud0c0\ub098\ub294 CPU time\uc740 DB\uac00 startup\ud55c \uc774\ud6c4\uc5d0 \ucd95\uc801\ub418\ub294 \uac12\uc774\ub2e4.\uadf8\ub798\uc11c<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \ud2b9\uc815 \uae30\uac04 \ub3d9\uc548 \uc218\uc9d1\ub41c data\ub97c \ud1b5\ud574 \uc0ac\uc6a9\ub7c9\uc744 \uad6c\ud558\ub294 \uc2a4\ud06c\ub9bd\ud2b8\ub098 \ud234\uc744 \uc0ac\uc6a9\ud574\uc57c \uc815\ud655<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \ud55c \ube44\uad50\ub97c \ud560 \uc218 \uc788\ub2e4. CPU\ub97c \uc0ac\uc6a9\ud558\ub294 session\uc774 \ud655\uc778\ub418\uba74, \ud574\ub2f9 session\uc758<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; v$session view\ub97c \uc774\uc6a9\ud574\uc11c \ucd94\uac00\uc801\uc778 \uc815\ubcf4\ub97c \ucc38\uace0\ud55c\ub2e4.<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (4) \ud2b9\uc815 session\uc774 \uacb0\uc815\ub418\uba74, SQL_TRACE\ub97c \uc774\uc6a9\ud574\uc11c \ud574\ub2f9 session\uc5d0\uc11c \uc0ac\uc6a9\ud55c SQL\ubb38<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\ub4e4 \uc911\uc5d0\uc11c CPU\ub97c \ub9ce\uc774 \uc18c\ubaa8\ud558\ub294 SQL\ubb38\uc744 \ud30c\uc545\ud55c \ud6c4, \ub2e4\uc74c \uc0ac\ud56d\ub4e4\uc744 \ud30c\uc545\ud558\uc5ec \ud29c\ub2dd\ud55c\ub2e4<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&gt; SQL\ubb38 \ud29c\ub2dd\uc73c\ub85c CPU usage\ub97c \uc904\uc77c \uc218 \uc788\ub294\uc9c0 \ud30c\uc545\ud558\uc5ec \uc870\uce58\ud55c\ub2e4.<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&gt; Reparse\uac00 \uc774\ub8e8\uc5b4\uc9c0\uc9c0 \uc54a\ub3c4\ub85d application\uc744 \uc218\uc815\ud55c\ub2e4. \uc608\ub97c \ub4e4\uba74, \uc790\uc8fc \uc0ac\uc6a9\ub418\ub294<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sql\ubb38\ub4e4\uc5d0 \ub300\ud574\uc11c\ub294 cursor\ub97c \uc0ac\uc6a9\ud574\uc11c open\uacfc fetch\ub97c \ubc18\ubcf5\uc801\uc73c\ub85c \uc0ac\uc6a9\ud558\uc5ec<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; parse\ub97c \uc904\uc778\ub2e4.( \uad8c\uc7a5\ud558\ub294 \ubc29\ubc95\uc774 \uc544\ub2d8 )<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&gt; SESSION_CACHED_CURSORS \ucd08\uae30\ud654 \ud30c\ub77c\ubbf8\ud130\ub97c \uc774\uc6a9\ud574\uc11c parsing\uc774 \ubc18\ubcf5\uc801\uc73c\ub85c<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \uc774\ub8e8\uc9c0\ub294 \uac83\uc744 \uc904\uc778\ub2e4.( \uad8c\uc7a5\ud558\ub294 \ubc29\ubc95\uc774 \uc544\ub2d8 )<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&gt; Parse count\uac00 \uc801\uace0,execute count\ub3c4 \uc801\uc73c\ub098 &nbsp;SQL\ubb38\uc774 WHERE\uc808\uc744 \uc81c\uc678\ud55c \ubd80\ubd84\uc774<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \ube44\uc2b7\ud558\ub2e4\uba74, Literal SQL\ubb38\uc744 \ub9ce\uc774 \uc0ac\uc6a9\ud558\uace0 \uc788\ub294\uc9c0\ub294 \uc54a\uc740\uc9c0 \ud30c\uc545\ud558\uc5ec \uac00\ub2a5\ud558\uba74<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Bind Variable\uc744 \uc0ac\uc6a9\ud574\uc11c parsing\uc744 \uc904\uc77c \uc218 \uc788\ub3c4\ub85d \ud55c\ub2e4.<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp; &nbsp; &nbsp; 3) \uc798\ubabb \uc124\uacc4\ub41c object<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Scalability\uc5d0 \ub300\ud55c \uc124\uacc4\uac00 \uc798\ubabb\ub418\uc5c8\uc744 \uacbd\uc6b0\uc5d0\ub3c4 CPU\ub97c \ub9ce\uc774 \uc18c\ubaa8\ud558\uac8c \ub420 \uc218 \uc788\ub2e4. \uc608\ub97c<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\ub4e4\uba74 \ub108\ubb34 \ub9ce\uc740 \uc778\ub371\uc2a4\ub97c \uc0ac\uc6a9\ud55c\ub2e4\ub358\uac00, right-hand index\ubb38\uc81c( \ud2b9\uc815 \ube14\ub85d\uc5d0 \uc785\ub825\uc774 \ubab0\ub9ac\ub294<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;index \uad6c\uc870 \ubb38\uc81c )\ub97c \uc77c\uc73c\ud0a8\ub2e4\ub358\uac00, \ud2b9\uc815 block\uc5d0 \ub108\ubb34 \ub9ce\uc740 rows\uac00 \ub4e4\uc5b4\uc788\ub2e4\ub358\uac00, \uc544\ub2c8\uba74<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;partitioning\uc774 \uc801\uc808\ud558\uac8c \uc774\ub8e8\uc5b4\uc9c0\uc9c0 \uc54a\uc740 \uacbd\uc6b0\uac00 \uc788\ub2e4. \uc774\ub7ec\ud55c \ubb38\uc81c \ub54c\ubb38\uc5d0 \ubc1c\uc0dd\ub41c \uacbd\ud569\uc740<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;CPU\ub97c \ub9ce\uc774 \uc18c\ubaa8\ud558\uac8c \ub418\uace0, scability\uac00 \uc120\ud615\uc801\uc73c\ub85c \uc99d\uac00\ud558\uc9c0 \ubabb\ud558\uac8c \ud55c\ub2e4. \uc774\ub7ec\ud55c \ubb38\uc81c\ub294<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\uc8fc\ub85c Buffer busy waits\uc73c\ub85c \ubc1c\uc0dd\ub41c\ub2e4.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\uc624\ub77c\ud074 DB \uc11c\ubc84\uc758 CPU \uc18c\ubaa8\uc758 \uc6d0\uc778&#8230; &nbsp; 1. CPU\uc18c\ubaa8\uc758 \uc8fc\uc6d0\uc778 &nbsp; &nbsp; &nbsp; &#8211; CPU\uc18c\ubaa8\uc758 \uc8fc\uc694\uc778\uc740 \uc8fc\ub85c \uc798\ubabb \uc9dc\uc5ec\uc9c4 SQL\ub85c \uc778\ud574 \ubc1c\uc0dd\ud55c\ub2e4. \uc5b4\ub5a4 SQL\uc774 CPU\uc758 \uc790\uc6d0\uc744 \uc798\ubabb \uc0ac\uc6a9\ud558\uc5ec \uc790\uc6d0\uc744 \uc18c\ubaa8\ud558\ub294\uc9c0\ub97c \uc54c \uc218 \uc788\ub2e4\uba74,&nbsp; \ud574\ub2f9 SQL\ub9cc \ud29c\ub2dd\ud558\uc5ec \uc0ac\uc6a9\ud558\uba74 \ubb38\uc81c\ub294 \uc27d\uac8c \ud574\uacb0\uc774 \ub420 \uac83\uc774\ub2e4.&nbsp; \uadf8\ub7ec\ub098 \uc774 \uc6d0\uc778\uc774 \uac1c\ubcc4\uc801\uc778 SQL\ubb38\uc7a5\uc774 \uc544\ub2c8\uace0 DBMS\ucc28\uc6d0\uc5d0\uc11c\uc758 \ubb38\uc81c\ub77c\uba74 \uc774\uc57c\uae30\ub294 \ub610 \ub2ec\ub77c\uc9c4\ub2e4. \ud558\uc5ec DBMS\ucc28\uc6d0\uc5d0\uc11c [&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":[14],"tags":[157,158,159,160],"jetpack_featured_media_url":"","amp_enabled":true,"_links":{"self":[{"href":"http:\/\/haisins.synology.me\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/416"}],"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=416"}],"version-history":[{"count":0,"href":"http:\/\/haisins.synology.me\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/416\/revisions"}],"wp:attachment":[{"href":"http:\/\/haisins.synology.me\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=416"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/haisins.synology.me\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=416"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/haisins.synology.me\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=416"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}