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
Ïà¹ØÎĵµ£º
ÏÂÃæÊÇ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 ......
GSD global services daemon (GSD)
ÓëracµÄ¹ÜÀí¹¤¾ßdbca srvctl
oem½øÐн»»¥£¬ÓÃÀ´Íê³ÉʵÀýµÄÆô¶¯¹Ø±ÕµÈ¹ÜÀíÈÎÎñ¡£
ΪÁ˱£Ö¤ÕâЩ¹ÜÀí¹¤¾ßÔËÐÐÕý³£±ØÐëÔÚËùÓеĽڵãÉÏÏÈstart
gsd,²¢ÇÒÒ»¸öGSD½ø³ÌÖ§³ÖÔÚ
Ò»¸ö½ÚµãµÄ¶à¸örac.gsd½ø³ÌλÓÚ$ORACLE_HOME/binĿ¼Ï£¬ÆälogÎļþ
Ϊ$oracle_home
/srvm/log/gsdaemon.log
À ......
OracleʵÏÖ×ÔÔöÖ÷¼ü
oracleûÓÐORACLE×ÔÔö×Ö¶ÎÕâÑùµÄ¹¦ÄÜ£¬µ«ÊÇͨ¹ý´¥·¢Æ÷(trigger)ºÍÐòÁÐ(sequence)¿ÉÒÔʵÏÖ¡£
create table t_client (id number(4) primary key,
pid number(4) not null,
name varchar2(30) not null,
client_id varchar2(10),
client_level char(3),
bank_acct_no varchar2(30),
contact_tel&n ......
1.´´½¨²âÊÔ±í
create table users(
userid int primary key,
username varchar2(20),
userpwd varchar2(20)
);
insert into users values(1,'test','test');
insert into users values(2,'test','test');
insert into users values(3,'test','test');
insert into users values(4,'test','test');
insert i ......