oracleÌåϵ½á¹¹ÉîÈëѧϰBuffer Cache
oracleÌåϵ½á¹¹ÉîÈëѧϰBuffer Cache - Overview
oracle 2009-09-02 23:13:26 ÔĶÁ40 ÆÀÂÛ0 ×ֺţº´óÖÐС
ÌÎÌÎÉîÈëѧϰoracleÌåϵ½á¹¹
ÎÒ·¢¾õ£¬Ó¢ÎĵÄһЩ¼¼ÊõÎÄÕÂÔÚÃèÊöoracleÔÀí·Ç³£µÄÇ¡µ±µ½Î»£¬±í´ïµÄ·Ç³£µÄÃÀ£¬ºÇºÇ¡£Ó¢ÎIJ»ºÃ£¬Ï׳ó·Ò벢ѧϰÁË£¬ÈÏÕæ¿´ÁË£¬ÏàÐÅÄãÊÜÒæ·Ëdz¡£
oracleÌåϵ½á¹¹Ö®£ºBuffer Cache - Overview
All Oracle data is obtained by users from the buffer cache. The basic purpose of the cache is to minimize physical
disk I/O by holding (buffering) copies of requested data blocks in memory. Data that is buffered in the cache can
be served to users at memory access speed, much faster than going to disk for it. The large performance penalty of
disk I/O makes tuning the buffer cache an extremely important task for the DBA.
Oracle data is stored on disk in identically sized units called blocks. Block size is determined at database creation
by the DB_BLOCK_SIZE initialization parameter. The buffer cache is also divided into buffers of this same size, and
each buffer can hold exactly one database block. Thus, the block is the basic unit of data transfer between disk and
memory in Oracle.
ËùÓеÄoracleÊý¾Ý»ñÈ¡£¬¶¼ÊÇÓû§Í¨¹ý¸ßËÙÊý¾Ý»º´æÈ¡µÃµÄ£¬×î»ù±¾µÄÄ¿µÄ¾ÍÊÇΪÁ˼õÉÙÎïÀí´ÅÅ̵ÄI/O²Ù×÷ͨ¹ý°ÑÇëÇóµÄÊý¾Ý±£´æÔÚÄÚ´æµ±ÖС£
±»»º´æÔÚ¸ßËÙ»º³åÇøµÄÊý¾ÝÄܱ»Óû§¿ìËٵĴÓÄÚ´æÖлñÈ¡µ½£¬ÄDZȴӴÅÅÌȥȡµÃÊý¾ÝÒª¿ìºÜ¶à¡£´ÅÅ̵ÄI/OËùÏûºÄµÄ¾Þ´óµÄÐÔÄÜ´ú¼Û£¬ÕâʹµÃµ÷ÓÅ
Êý¾Ý¿â¸ßËÙ»º´æ³ÉΪdbaÒ»¸ö·Ç³£Ã÷È·µÄÖØÒªÈÎÎñ¡£
oracleÊý¾Ý±»´æ´¢ÔÚ´ÅÅÌÖеÈͬ´óСµÄµ¥ÔªÖУ¬ÕâЩµ¥Ôª±»½Ð×ö¿é£»¿é´óСÔÚÊý¾Ý¿â±»´´½¨Ê±Í¨¹ý³õʼ²ÎÊýdb_block_sizeÀ´¶¨Òå¡£Êý¾Ý¸ßËÙ»º´æ
Ò²±»»®·Ö³ÉͬÑù´óСµÄ»º´æ¿é¡£²¢ÇÒÿ¸ö»º´æ¿é³ÖÓÐÒ»¸öÊý¾Ý¿â¿é£¬Òò´Ë¿éÊÇ»ù±¾µÄÊý¾Ý´«Ë͵¥ÔªÔÚÊý¾ÝÎļþºÍÄÚ´æÖ®¼ä¡£
oracleÊý¾Ý¿â¸ßËÙ»º´æÖ®Cache Hit Ratio
The buffer cache is a shared resource, accessible by all users. When a user process requests data, Oracle firsts looks
for that data's block in the cache. If the data is buffered in the cache it is returned to the requ
Ïà¹ØÎĵµ£º
--´´½¨Óû§
create user iagent identified by ia
--profile default
default tablespace users
temporary tablespace temp;
--account unlock;
--ɾ³ýÓû§
drop user iagent cascade;
--ÐÞ¸ÄÓû§ÃÜÂë
alter user iagent identified by ia;
--¸ø´´½¨µ ......
¾ßÌå²½Öè¾Í²»¶à˵ÁË £¬Òªµ¼³öµÄSQLSERVER±í½Ð LDJCUS£¬Ö÷¼ü Uid (int ×Ô¶¯Ôö³¤ÁÐ)£¬µ¼Èëµ½Oracle×ܱ¨´í£º¶ÔÏóÃûÎÞЧ £¬È¥µôÖ÷¼üÁоͿÉÒÔ£¬²»ÖªµÀΪʲô£¿ÄѵÀ×Ô¶¯Ôö³¤µÄÖ÷¼üÁоͲ»Äܵ¼Èëµ½OracleÖУ¿£¿£¿Òɻ󡣡£¡£¡£ ......
ÏÂÃæÊÇORACLEÐÐÁÐת»»Í¨Óô洢¹ý³Ì£º
1¡¢
Function Fun_Split_Str(p_Str Varchar2, p_Division Varchar2, p_Seq Int)
Return Varchar2 Is
v_First Int;
v_Last Int;
Begin
If p_Seq < 1 Then
&nbs ......
connect by Êǽṹ»¯²éѯÖÐÓõ½µÄ£¬Æä»ù±¾Óï·¨ÊÇ£º
select ... from tablename start with Ìõ¼þ1
connect by Ìõ¼þ2
where Ìõ¼þ3;
Àý£º
select * from table
start with org_id = 'HBHqfWGWPy'
connect by prior org_id = parent_id;
¼òµ¥ËµÀ´Êǽ«Ò»¸öÊ÷×´½á¹¹´æ´¢ÔÚÒ»ÕűíÀ±ÈÈçÒ»¸ö±íÖдæÔÚÁ½¸ö×Ö¶Î:
......