[bbk2193] 第34集 - Chapter 09-Optimizing Sore Perations(03)
2013-05-06 18:45
253 查看
PGA Target Advice Statistics
V$PGA_TARGET_ADVICE predicts how cache hit percentages shown in V$PGASTAT evolve.STATISTICS_LEVEL must be set to at least TYPICAL.(提示:如果想使V$PGA_TARGET_ADVICE工作,必须将STATISTIC_LEVEL修改成至少TYPICAL级别)
SQL> select * from v$PGA_TARGET_ADVICE; PGA_TARGET_FOR_ESTIMATE PGA_TARGET_FACTOR ADV BYTES_PROCESSED ESTD_TIME ESTD_EXTRA_BYTES_RW ESTD_PGA_CACHE_HIT_PERCENTAGE ESTD_OVERALLOC_COUNT ----------------------- ----------------- --- --------------- ---------- ------------------- ----------------------------- -------------------- 163577856 .125 ON 6551463936 25831789 72195072 99 6 327155712 .25 ON 6551463936 25550234 0 100 0 654311424 .5 ON 6551463936 25550234 0 100 0 981467136 .75 ON 6551463936 25550234 0 100 0 1308622848 1 ON 6551463936 25550234 0 100 0 1570347008 1.2 ON 6551463936 25550234 0 100 0 1832071168 1.4 ON 6551463936 25550234 0 100 0 2093796352 1.6 ON 6551463936 25550234 0 100 0 2355520512 1.8 ON 6551463936 25550234 0 100 0 2617245696 2 ON 6551463936 25550234 0 100 0 3925868544 3 ON 6551463936 25550234 0 100 0 PGA_TARGET_FOR_ESTIMATE PGA_TARGET_FACTOR ADV BYTES_PROCESSED ESTD_TIME ESTD_EXTRA_BYTES_RW ESTD_PGA_CACHE_HIT_PERCENTAGE ESTD_OVERALLOC_COUNT ----------------------- ----------------- --- --------------- ---------- ------------------- ----------------------------- -------------------- 5234491392 4 ON 6551463936 25550234 0 100 0 7851737088 6 ON 6551463936 25550234 0 100 0 1.0469E+10 8 ON 6551463936 25550234 0 100 0 14 rows selected.
将上述SQL语句,进行优化一下,如下:
SELECT ROUND(pga_target_for_estimate/1024/1024) AS target_mb, estd_pga_cache_hit_percentage AS cach_hit_percent, estd_overalloc_count FROM v$pga_target_advice ORDER BY target_mb; TARGET_MB CACH_HIT_PERCENT ESTD_OVERALLOC_COUNT ---------- ---------------- -------------------- 156 99 6 312 100 0 624 100 0 936 100 0 1248 100 0 1498 100 0 1747 100 0 1997 100 0 2246 100 0 2496 100 0 3744 100 0 TARGET_MB CACH_HIT_PERCENT ESTD_OVERALLOC_COUNT ---------- ---------------- -------------------- 4992 100 0 7488 100 0 9984 100 0 14 rows selected.
解读优化后的SQL语句:以第一条记录为例:假如将PGA_AGGRGATE_TARGET参数值设置为156MB的话,缓存命中率为99%,溢出6块.以下记录依次类推.
Understanding the view
Limitation of Base Statistics
How to Tune
v$sysstat and v$sesstat
SQL> SELECT name profile,cnt,decode(total,0,0,round(cnt*100/total)) percentage 2 FROM (SELECT name,value cnt,(sum(value) over()) total 3 FROM V$SYSSTAT 4 WHERE name like 'workarea exec%' 5 ); PROFILE CNT PERCENTAGE ---------------------------------------------------------------- ---------- ---------- workarea executions - optimal 180593 100 workarea executions - onepass 4 0 workarea executions - multipass 0 0
相关文章推荐
- [bbk2192] 第33集 - Chapter 09-Optimizing Sore Perations(02)
- [bbk2343] 第48集 - Chapter 12-Optimizing Sore Perations(03)
- [bbk2194] 第35集 - Chapter 09-Optimizing Sore Perations(04)
- [bbk2195] 第36集 - Chapter 09-Optimizing Sore Perations(05)
- [bbk2340] 第45集 - Chapter 09-Optimizing Sore Perations(00)
- [bbk2190] 第31集 - Chapter 09-Optimizing Sore Perations(00)
- [bbk2341] 第46集 - Chapter 09-Optimizing Sore Perations(01)
- [bbk2191] 第32集 - Chapter 09-Optimizing Sore Perations(01)
- [bbk2342] 第47集 - Chapter 09-Optimizing Sore Perations(02)
- [bbk2344] 第49集 - Chapter 12-Optimizing Sore Perations(04)
- [bbk2345] 第50集 - Chapter 12-Optimizing Sore Perations(05)
- Chapter -09 Creating Procedures 03
- 第08、09讲:Chapter 03--Managing an Oracle Instance.swf
- Chapter 09-Manipulation Data - 03
- 顺序程序设计03 - 零基础入门学习C语言09
- 2018_03_09 将本地项目上传到github中
- tensorflow44《TensorFlow实战》笔记-09-03 分布式并行 code
- 从大出着眼,小处着手做工程(09-03-12)
- [linux device driver] Chapter 03:从scull_load了解awk
- [bbk2909]第5集 - Chapter 03 - 介绍RAC的体系结构