ORACLE调优之 多缓存池命中率(摘自文平书)
评估数据高速缓存效率的指标是命中率。该命中率通过查询V$SYSSTAT 和$BUFFER_POOL_STATISTICS视图可以得到。这个视图可以
查询每个缓存池各自的命中率。缓存池的命中率的计算采用下面的公式:
1-(physical_reads/(db_block_gets+consistent_gets))
下面的SQL语句常用来查询当前各个缓存池的命中率情况:
SQL>select name,physical_reads,db_block_gets,consistent_gets,
1-(physical_reads/(db_block_gets+consistent_gets)) "命中率"
from v$buffer_pool_statistics;
SQL> select name,physical_reads,db_block_gets,consistent_gets,
2 1-(physical_reads/(db_block_gets+consistent_gets)) "命中率"
3 from v$buffer_pool_statistics;
NAME PHYSICAL_READS DB_BLOCK_GETS CONSISTENT_GETS ??????
-------------------- -------------- ------------- --------------- ----------
DEFAULT 3806 1541 44202 .916796013
通过对V$BH视图的查询可以获得当前存放在SGA中的所有数据块的块ID,下面列出了两种方法,用来找出数据库对象(表、索引等
段对象)占用数据缓存的状态,或者某个段使用缓存的情况。下列的查询语句列出了当前数据高速缓存中存放的所有数据块的段名,
以及该段在数据缓存中数据块的计数:
SQL>select o.object_name OBJECT_NAME,count(*) number_of_blocks
from dba_objects o,v$BH bh
where o.data_object_id=bh.objd
and o.owner not in('SYS','SYSMAN')
 
相关文档:
We are pleased to announce that Oracle has completed its acquisition of Sun Microsystems and Sun is now a wholly owned subsidiary of Oracle. With this news, we want to reiterate our commitment to deliver complete, open and integrated systems that help our customers improve the performance, reliabi ......
一、 常用日期数据格式
1.Y或YY或YYY 年的最后一位,两位或三位
SQL> Select to_char(sysdate,'Y') from dual;
TO_CHAR(SYSDATE,'Y')
--------------------
7
SQL> Select to_char(sysdate,'YY') from dual;
TO_CHAR(SYSDATE,'YY')
---------------------
07
SQL> Select to_char(sysdate,'YYY') from d ......
录oracle数据库时常用的操作命令整理
1、su – oracle 不是必需,适合于没有DBA密码时使用,可以不用密码来进入sqlplus界面。
2、sqlplus /nolog 或sqlplus system/manager 或./sqlplus system/manager@ora9i;
3、SQL>connect / as sysdba ;(as sysoper)或
connect internal/oracle AS SYSDBA ;(scott/tiger) ......
Can you connect to an Oracle database with a 64-bit Oracle client?
Technote (FAQ)
Question
You are unable to connect to an Oracle database with a 64-bit Oracle client. Does Lotus Enterprise Integrator (LEI), Lotus Domino Enterprise Connection Services (DECS), or LSX ......
以system登录进去之后,执行下面的命令:
SQL> alter user scott account unlock; (完成解锁的操作)
用户已更改。
SQL> alter user scott identified by tiger; (重新给scott这个用户设定密码)
用户已更改。
SQL> conn scott/tiger
已连接。 ......