总结--常用的监控SQL语句集合
1.监控事例的等待: select event,sum(decode(wait_time,0,0,1)) prev,sum(decode(wait_time,0,1,0)) curr, count(*)from v$session_wait group by event order by 4; 2.回滚段的争用情况: ...
copying statistics between databases
SQL> execute dbms_stats.create_stat_table('ocp007','stat_table','users');PL/SQL 过程已成功完成。SQL> execute dbms_stats.export_table_stats('ocp007','EMPLOYEES',null,'stat_table','mytest',true,null);PL...
analyze
1、analyze analyze {index|table|cluster} OBJECT_NAME {compute|delete|estimate} statistics [for ... [size N]] [sample N {rows|percent}]==============SQL> analyze ta...
dbms_stats使用
dbms_stats包问世以后,Oracle专家可通过一种简单的方式来为CBO收集统计数据。目前,已经不再推荐你使用老式的分析表和 dbms_utility方法来生成CBO统计数据。那些古老的方式甚至有可能危及SQL的性能,因为它们并非总...
monitoring index space
SQL> analyze index pk_test_tab validate structure;索引被分析SQL> select name,(del_lf_rows_len/lf_rows_len)*100 as wastage from index_stats;NAME &nb...
explain plan
SQL> explain plan set statement_id='mytest' into plan_table for 2 select employee_id from employees where employee_id between 100 and 108;已解释。SQL> desc dbms_xplanFUNCTION DISPLAY RET...
autotrace on
见《D33513-ORACLE9i Performance Tuning Vol1.pdf》14-24SQL> set autotrace onSQL> select employee_id from employees where rownum<10;EMPLOYEE_ID----------- 100...
tkprof使用
连接一个测试用户conn ocp007/ocp007SQL> select value from v$parameter where name in('user_dump_dest','timed_statistics');VALUE------------------------------------------------------------------------...
statspack学习及操作实践
今天实验操作了一把。操作步骤如下:step1:连接sysdba用户Enter user-name: sys/sys as sysdbastep2:创建表空间SQL> create tablespace perfstat datafile 'd:/oracle/oradata/mydb/perfstat.dbf' size 100m;T...
ocp 033学习笔记
学习中,源代码。