|
1.perfstat/perfstat ·Î loginÇÏ¿© ÇöÀç ½ÃÁ¡ÀÇ Åë°è¸¦ ¼öÁýÇϱâÀ§ÇØ snap.sqlÀ» ½ÇÇàÇÏ°í snapshot id¸¦ È®ÀÎÇصдÙ.
$ sqlplus /nolog
SQL> @$HOME/LABS/ptw9i/snap.sql
Connected.
PL/SQL procedure successfully completed.
SNAPSHOT_ID
-----------
14
SQL> exit
2. workload¸¦ À¯¹ßÇÑ´Ù.
$ sqlplus sh/sh
SQL> !cat $HOME/LABS/ptw9i/lab05_02.sql
drop index sales_prod_bix;
CREATE BITMAP INDEX sales_prod_bix
ON sales (prod_id)
LOCAL COMPUTE STATISTICS ;
drop index sales_cust_bix;
CREATE BITMAP INDEX sales_cust_bix
ON sales (cust_id)
LOCAL COMPUTE STATISTICS ;
drop index sales_time_bix;
CREATE BITMAP INDEX sales_time_bix
ON sales (time_id)
LOCAL COMPUTE STATISTICS ;
drop index sales_channel_bix;
CREATE BITMAP INDEX sales_channel_bix
ON sales (channel_id)
LOCAL COMPUTE STATISTICS ;
drop index sales_promo_bix;
CREATE BITMAP INDEX sales_promo_bix
ON sales (promo_id)
LOCAL COMPUTE STATISTICS ;
SQL> @LABS/ptw9i/lab05_02.sql
SQL> exit
3. system/manager·Î loginÇÏ¿© redo log buffer¿¡ ´ëÇÑ space request°¡ ÀÖ¾ú´ÂÁö È®ÀÎÇÑ´Ù.
$ sqlplus system/manager
SQL> select r.value "Retries",e.value "Entries",r.value/e.value*100 "Percentage"
from v$sysstat r,v$sysstat e
where r.name='redo buffer allocation retries' <-- User Process°¡ redolog buffer¿¡¼ space°¡ ³ª±â¸¦ ±â´Ù¸° Ƚ¼ö
and e.name= 'redo entries';
<-- Redo entriesÀÇ °¹¼ö
Retries Entries Percentage
---------- ---------- ----------
1 21841 .004578545 <-- ÀÌ °ªÀº 1º¸´Ù´Â À۾ƾßÇÑ´Ù.
±×·¸Áö ¾Ê´Ù¸é? log_buffer Áõ°¡, checkpoint, archiving¼º´É °³¼±
SQL> exit
4. À̹ø¿¡´Â perfstat/perfstat ·Î loginÇÏ¿© redo log bufferÀÇ Å©±â¿¡ ¹®Á¦°¡ ÀÖ´ÂÁö È®ÀÎÇØ º»´Ù.
$ sqlplus /nolog
SQL> @LABS/ptw9i/snap.sql
SQL> @LABS/ptw9i/spreport.sql
Enter value for begin_snap: 14 <-- ÀÌÀü¿¡ È®ÀÎÇØ µÎ¾ú´ø snapshot id
Enter value for end_snap: 15 <-- ¹æ±Ý È®ÀÎÇÑ snapshot id
SQL> exit
$vi sp_14_15.lst
Instance Efficiency Percentages (Target 100%)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Buffer Nowait %: 100.00 Redo NoWait %: 100.00 <--**
Buffer Hit %: 60.66 In-memory Sort %: 100.00
Library Hit %: 98.01 Soft Parse %: 97.62
Execute to Parse %: 34.24 Latch Hit %: 99.99
Parse CPU to Parse Elapsd %: 62.20 % Non-Parse CPU: 99.93
|