Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

oracle£ºCLUSTER

±í´Ø£¨table   cluster)ÊÇÒ»¸öÊý¾Ý¿â¶ÔÏó£¬Ëü¿ÉÒÔ½«ÄÇЩ¾­³£ÔÚÏàͬÊý¾Ý¿éÖÐÒ»ÆðʹÓÃµÄ±í½øÐÐÎïÀí·Ö×é¡£µ±Äã´¦ÀíÄÇЩ¾­³£Á¬½ÓÔÚÒ»Æð½øÐвéѯµÄ±íʱ£¬±í´ØÊÇÌØ±ðÓÐЧµÄ¡£Ò»¸ö±í´Ø´æ´¢´Ø¼ü£¨ÓÃÓÚ½«±íÁ¬½Óµ½Ò»ÆðµÄÁУ©£¬ÒÔ¼°´Ø±íÖеÄÁÐÖµ¡£ÒòΪ´ØÖÐµÄ±í¶¼±»´¢´æÔÚÏàͬµÄÊý¾Ý¿â¿éÖУ¬ËùÒÔʹÓôع¤×÷ʱ£¬I/O²Ù×÷¾Í¼õÉÙÁË¡£
ʹÓõäÐÍÊý¾Ý´ØµÄÄ¿µÄÊÇΪÁËÔÚÓ²ÅÌÉϽ«Ó¦ÓóÌÐò¾­³£Ò»ÆðʹÓõÄÐд洢ÔÚÒ»¿é£¬µ±Ó¦ÓóÌÐòÇëÇóÕâ×éÐÐʱ£¬oracleÖ»ÓÃÒ»¸ö»ò¼¸¸öÓ²ÅÌI/O¾ÍÄÜÕÒµ½ËùÓб»ÇëÇóµÄÐС£
1.cluster ¿ÉÒÔ½«Á½¸ö»ò¶à¸ö±íÀ¦°óÔÚÒ»Æð,,clusterÊÇÒ»ÖÖÊý¾Ý¿â½á¹¹,ÔÚÕâ¸ö½á¹¹ÖÐ,¿ÉÒÔ½«Á½¸ö»òÕß¶à¸ö±í´¢´æÔÚÏàͬµÄÊý¾Ý¿é»ò¶ÎÖÐ,¼ÓÈëµ½clusterÖеÄÿ¸ö±íÐн«ÎïÀíµØ´æ´¢ÔÚÏàͬµÄ¿éÖÐ,ºÃÏñÕâЩ±íÔÚcluster key ´¦Á¬½ÓÆðÀ´ÁËÒ»Ñù.ͨ¹ýÏÂÃæµÄÀý×Ó,Ä㽫Àí½âclusterÈçºÎµÄ¹¤×÷.
aa ±í
SQL> select * from aa;
ID NAME SE AGE
---- ---- -- ----------
01 cc m 20
02 dd f 18
03 ee m 22
04 ff f 21
05 gg f 19
06 hh m 20
ÒÑÑ¡Ôñ6ÐС£
bb±í
SQL> select * from bb;
SE LIVING
-- ------
m 11-01
f 11-02
2.
ÔÚʹÓÃaa,bb±íµÄʱºò,Èç¹ûÏëÒª½«ÕâÁ½¸ö±í·Åµ½Ò»¸öclusterÖÐ,Ôò¿ÉÒÔ½«ÕâÁ½¸ö
±íÔÚsexÁÐÉÏÁ¬½ÓÆðÀ´,ÔÚÕâÖÖÇé¿öÏÂ,°ÉsexÁгÆÎªcluster key ,µ±Íê³ÉclusterµÄ

´´½¨ºó,Á½¸ö±íÖеÄÊý¾Ý½«»áÔÚclusterÖÐÎïÀíµØÁ¬½ÓÆðÀ´.ÔÚ´´½¨clusterµÄʱºòÓÐÁ½ÖÖÑ¡Ôñ
:
* index cluster(
ĬÈÏ,ÐèÒªÔÚÆäÖд´½¨cluster index)
* hash cluster
3.´´½¨clusterµÄ²½Öè:
1). SQL> create cluster ab_cluster (sex char(2) ) tablespace users;
´ØÒÑ´´½¨¡£
ÉÏÃæµÄÓï¾ä´´½¨ÁËÒ»¸öÃûΪab_clusterµÄcluster,ÇÒ½«ËüÖÃÓÚ±í¿Õ¼äusrsÖÐ.ÒòΪÉÏÃæ´´½¨µÄÊÇindex cluster ,ËùÒÔµ±cluster´´½¨Íêºó,»¹±ØÐëÔÚcluster key ÉÏ´´½¨Ë÷Òý.
2). SQL> create index ab_cluster_idx on cluster ab_cluster tablespace users;
Ë÷ÒýÒÑ´´½¨¡£
{ µ±´´½¨hash clusterµÄʱºò,Àý×ÓÈçÏÂ:
Create cluster ab_cluster (sex char(2) size 8k hashkeys 1000 tablespace users;
²ÎÊýhashkeysÓÃÀ´¶¨Òå·ÖÅ䏸±íµÄhash]ÖµµÄÊýÄ¿.Ö¸³öÁËÔÚclusterÖÐΨһÐÔcluster keyµÄ×î´óÖµ.}
3).´´½¨²ÎÓëclusterµÄ±í.£¨aa bb£©
SQL> create table aa(id varchar2(4) ,name varchar2(4),sex char(2),age number(2))
cluster ab_cluster (sex);
±íÒÑ´´½¨.
SQL> create table bb( sex


Ïà¹ØÎĵµ£º

Oracle³£ÓÃÉÁ»Ø²Ù×÷

È·ÈÏÉÁ»ØÆôÓÃÖÐ
SHOW PARAMETER RECYCLEBIN; ÆôÓÃÉÁ»Ø
ALTER SYSTEM SET RECYCLEBIN = ON; ÉÁ»ØDROPµÄ±í
FLASHBACK TABLE xxx TO BEFORE DROP; ³¹µ×Çå³ýDROPµÄ±í,½«²»ÄÜÔÙÉÁ»Ø.
PURGE TABLE xxx; Ö±½Ó³¹µ×DROPµô±í
DROP TABLE xxx PURGE; Çå¿ÕËùÓÐDROPµÄ±í
PURGE RE ......

ORACLEÖÐSQLÈ¡×îºóÒ»Ìõ¼Ç¼µÄ¼¸ÖÖ·½·¨

  ÔÚETL¹ý³ÌÖУ¬¾­³£»áÅöµ½È¡½á¹û¼¯µÄ×îºó»ò×îǰһÌõ¼Ç¼¡£ÈçÈ¡»îÆÚ´æ¿îµÄµ±Ç°ÀûÂÊ£¬¿ª»§½ð¶î£¬Ð­¶¨ÀûÂʵȡ£Èç¹û²»ÓÃLOOKUPµÄ·½Ê½£¬Èçͨ¹ýÓαêÈ¡»òÕßETL¹¤¾ßLOOKUP×é¼þʲôµÄ£¬ÔÚÒ»ÌõSQLÀïʵÏÖ£¬Ä¿Ç°ÊµÏÖÓм¸ÖÖ·½·¨¡£
1.ÒÔʱ¼ä»òÆäËû×ֶηÖ×éºóÔÚ×ÔÁ¬×Ô¼º£¬ÕâÑù²»½ö¿ÉÒÔ´ø³öÐèÒªLOOKUPµÄ×ֶΣ¬»¹¿ÉÒÔ´ø³öÆäËûÐèÒªµÄ×Ö ......

SQL Óë ORACLE µÄ±È½Ï (ת)


01¡¢SQLÓëORACLEµÄÄÚ´æ·ÖÅä
ORACLEµÄÄÚ´æ·ÖÅä´ó²¿·ÖÊÇÓÉINIT.ORAÀ´¾ö¶¨µÄ£¬Ò»¸öÊý¾Ý¿âʵÀý¿ÉÒÔÓÐNÖÖ·ÖÅä·½°¸£¬²»Í¬µÄÓ¦Óã¨OLTP¡¢OLAP£©ËüµÄÅäÖÃÊÇÓвàÖØµÄ¡£ SQL¸ÅÀ¨ÆðÀ´Ëµ£¬Ö»ÓÐÁ½ÖÖÄÚ´æ·ÖÅ䷽ʽ£º¶¯Ì¬ÄÚ´æ·ÖÅäÓ뾲̬ÄÚ´æ·ÖÅ䣬¶¯Ì¬ÄÚ´æ·ÖÅä³äÐíSQL×Ô¼ºµ÷ÕûÐèÒªµÄÄڴ棬¾²Ì¬ÄÚ´æ·ÖÅäÏÞÖÆÁËSQL¶ÔÄÚ´æµÄʹ Óá£
002¡¢SQ ......

Oracle PL\SQL²Ù×÷£¨Áù£©Óû§ºÍ½ÇÉ«

1.Óû§¹ÜÀí
£¨1£©½¨Á¢Óû§£¨Êý¾Ý¿âÑéÖ¤£©

CREATE USER smith
IDENTIFIED BY smith_pwd
DEFAULT TABLESPACE users
TEMPORARY TABLESPACE temp
QUOTA 5m ON users;
£¨2£©ÐÞ¸ÄÓû§
ALTER USER smith
QUOTA 0 ON SYSTEM;
£¨3£©É¾³ýÓû§
DROP USER smith;
DROP USER ......

¹ØÓÚoracle·þÎñ

OracleOraHome92Agent
OracleOraHome92ClientCache
OracleOraHome92HTTPServer
OracleOraHome92PagingServer
OracleOraHome92SNMPPeerEncapsulator
OracleOraHome92SNMPPeerMasterAgent
·Ö±ðÊÇ:
Agent´úÀí, OEMÈý²ã¹ÜÀíʱÓëOMS½øÐеǼǴ¦¹µÍ¨;
¿Í»§¶ËÐÅÏ¢Cache;
ÌṩWeb·þÎñ;
BP»ú֪ͨ·þÎñ,±ÈÈçÊý¾Ý¿âÓ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ