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

±±´óÇàÄñoracleѧϰ±Ê¼Ç10

Ë÷Òý
ΨһË÷Òý£º
ÁÐÖÐÎÞÖظ´Öµ£¬Î¨Ò»Ô¼Êø¡£
oracle×Ô¶¯ÎªÖ÷¼üºÍΪһ¼üÁд´½¨Î¨Ò»Ë÷Òý
Óï·¨£ºcreate unique index Ë÷ÒýÃû on ±íÃû(ÁÐÃû);
×éºÏË÷Òý£º
ÔÚ±íÖжà¸ö×Ö¶ÎÉÏ´´½¨µÄË÷Òý
Áа´ÈÎÒâ˳ÐòÅÅÁÐ
where×Ó¾äÖаüº¬¶à¸öÁеIJéѯ£¬¿ÉÌá¸ß·ÃÎÊËٶȡ£
Óï·¨£ºcreate index Ë÷ÒýÃû on ±íÃû(ÁÐÃû1,ÁÐÃû2,...,ÁÐÃûn)£º
·´Ïò¼üË÷Òý£º
·´×ªË÷ÒýÁÐÖеÄÿһ¸ö×Ö½Ú
½«Êý¾Ý²åÈë²Ù×÷·Ö²¼ÔÚÕû¸öË÷ÒýÉÏ
È磺
±ê×¼Ë÷Òý 1001£¬1002£¬1003£¬1004
·´Ïò¼üË÷Òý 1001£¬2001£¬3001£¬4001
ÔڱȽÏÊÇ£¬±ê×¼Ë÷Òý´Ó¸ßµ½µÍÆ¥Å䣬ÿ´Î¾ùÖظ´±È½ÏÇ°Èýλ100£¬¶ø·´Ïò¼üË÷ÒýÔڱȽϵÚһλʱºò¾Í¿ÉÒÔ²úÉú½á¹û£¬ËÙ¶ÈÔÚÕâÖÖÇé¿öϸü¿ì¡£
Óï·¨£ºcreate index Ë÷ÒýÃû on ±íÃû(ÁÐÃû) reverse;
alter index Ë÷ÒýÃû rebuild noreverse;--Öؽ¨±ê×¼Ë÷Òý
λͼË÷Òý£º
ΪµÍ»ùÊýÁд´½¨£¨Öظ´ÂʱȽϴó£¬ÈçÔ±¹¤±íÖÐְλ×ֶΣ©
Èçͼ£¬Î»Í¼Ë÷Òý½«rowidµÄ·¶Î§ºÍÒ»¸öbitmapÖµ°ó¶¨µ½Ä³Ò»Àà×Ö¶ÎÉÏ£¬bitmapÖÐ1±íʾ±¾×ֶγöÏÖ£¬0±íʾÆäËû×ֶγöÏÖ¡£
Óï·¨£ºcreate bitmap index Ë÷ÒýÃû on ±íÃû();
Ë÷Òý×éÖ¯±í£º
±íÊý¾Ý´æ´¢ÔÚÓëÆä¹ØÁªµÄË÷ÒýÖÐ
¶Ô±íÊý¾ÝµÄÐÞ¸ÄÖǻ۵¼Ö¶ÔË÷ÒýµÄ¸üÐÂ
ÔÚÖ÷¼üÉÏ´´½¨
create table ±íÃû(
ÁÐÃû ÀàÐÍ primary key,
...,
...
) organization index;
²éѯËٶȷdz£¿ì¡£
ÆÕͨ±í£º
rowidΨһ±êʶÐÐ
ÒþʽrowidÁÐ
»ùÓÚrowidµÄ·ÃÎÊ
˳ÐòɨÃè·µ»ØËùÓÐÐÐ
¿ÉÒÔ´æ´¢ÔÚ´ØÖÐ
Ö§³Ö·Ö·¢¡¢¸´ÖƺͷÖÇø
Ë÷Òý×éÖ¯±í£º
Ö÷¼üΨһµØ±êʶÐÐ
ûÓÐÒþʽrowidÁУ¨ÓÐÒ»¸öÎÞÒâÒåµÄÖµ£©
»ùÓÚÖ÷¼üµÄ·ÃÎÊ
ÍêÈ«Ë÷ÒýɨÃè·µ»ØËùÓÐÐУ¬²¢°´Ö÷¼ü˳ÐòÅÅÁÐ
²»ÄÜ´æ´¢ÔÚ´ØÖÐ
²»Ö§³Ö·Ö·¢¡¢¸´ÖƺͷÖÇø
»ùÓÚº¯ÊýµÄË÷Òý£º
»ùÓÚÒ»¸ö»ò¶à¸öÁÐÉϵĺ¯Êý»ò±í´ïʽ´´½¨µÄË÷Òý
±í´ïʽÖв»ÄÜ°üº¬¾Û¼¯º¯Êý£¨sum count avg min max£©
²»ÄÜÔÚlob¡¢ref»òǶÌ×±íÁÐÉÏ´´½¨
ÔÚ²éѯÖÐʹÓú¯Êýʱ×Ô¶¯µ÷ÓøÃË÷Òý£¬Ìá¸ß²éѯËÙÂÊ¡£
Óï·¨£ºcreate index Ë÷ÒýÃû on ±íÃû(lower(×Ö¶ÎÃû));
¼üѹËõË÷Òý£º
½«Ë÷Òý¼ü²ð·ÖΪǰ׺ÏîºÍºó׺Ïî
ÔÚÒ»¸öË÷Òý¿éÖУ¬Í¨¹ýºó׺Ïî¹²Ïí´ïµ½Ñ¹ËõµÄÄ¿µÄ
½ÚÊ¡´ÅÅ̿ռ䣬ÔÚÒ»¸öË÷Òý¿éÖпÉÒÔ´æ´¢¸ü¶àµÄ¼ü
Óï·¨£ºcreate index Ë÷ÒýÃû on ±íÃû(×Ö¶ÎÃû1,×Ö¶ÎÃû2) compress ѹËõ×Ö¶ÎÃûÔÚ½¨Á¢Ë÷Òýʱ²ÎÊýλÖÃ;
·ÖÇøË÷Òý£º
Ë÷Òý´æ´¢ÔÚ²»Í¬·ÖÇøÖÐ
±¾µØË÷Òý£º±¾µØǰ׺Ë÷Òý¡¢±¾µØÎÞǰ׺Ë÷Òý
È«¾ÖË÷Òý£ºÈ«¾Öǰ׺Ë÷Òý¡¢È«¾ÖÎÞǰ׺Ë÷Òý


Ïà¹ØÎĵµ£º

oracleѧϰ±Ê¼Ç——ÊÓͼ


1.ÊÓͼ£¨VIEW£©
1.1 ¸ÅÄî
       ÊÓͼ-----ÊÇÓÉSELECT²éѯÓï¾ä(¿ÉÒÔÊǵ¥±í»òÕ߶à±í²éѯ)¶¨ÒåµÄÒ»¸ö"Âß¼­±í",Ö»Óж¨Òå¶øÎÞÊý¾Ý,ÊÇÒ»¸ö"Ðé±í". ÔÚ´´½¨ÊÓͼʱ,Ö»Êǽ«ÊÓͼµÄ¶¨ÒåÐÅÏ¢±£´æÔÚÊý¾Ý×ÖµäÖÐ, ¶ø²¢²»½«Êµ¼ÊµÄÊý¾Ý¸´ÖƵ½Èκεط½, ¼´²»ÐèÒªÔÚ±í¿Õ¼äÖÐΪÊÓͼ·ÖÅä´æ´¢¿Õ¼ä. ÊÓͼÊDz鿴º ......

"ÐèÒª Oracle ¿Í»§¶ËÈí¼þ 8.1.7 »ò¸ü¸ß°æ±¾"½â¾ö°ì·¨

1.Ñ¡ÔñÄúËù°²×°OrcaleµÄĿ¼£¬ÀýÈ磺C:\Oracle
2.ÓÒ¼üµã»÷£¬µ¯³ö“ÊôÐÔ”¶Ô»°¿ò£¬Ñ¡Ôñ“°²È«”Ñ¡Ï
3.Ìí¼Ó“IUser_»ú×ÓÃû³Æ”Óû§µÄȨÏÞ£¬²ÉÓÃÍêÈ«¿ØÖƵķ½Ê½
4.È·¶¨Ó¦Óúó£¬ÔÚÑ¡Ôñ“°²È«”Ñ¡ÏÖÐÑ¡Ôñ“IUser_»ú×ÓÃû³Æ”Óû§£¬µã»÷¸ß¼¶
5.Ñ¡ÔñÑ¡Ôñ¿ò“ÓÃÔÚ ......

±±´óÇàÄñoracleѧϰ±Ê¼Ç1¡«2

    ÕâѧÆÚ×¼±¸»¨ÉÙÐíʱ¼äÑо¿Ò»ÏÂoracle£¬Ì¨Ê½»úµÄUbuntu²»Îȶ¨ÀÏ»µ£¬·ÅÆúÁËlinuxÉÏʹÓÃoracleµÄÏë·¨£¬ÔÚ×Ô¼º±Ê¼Ç±¾ÉÏ×°ÁËÒ»¸öoracle 10g express°æ±¾£¬Ñ§Ï°Ò»Ï¡£
    ±¾À´»¹ÏëÓÃÔƶËÐéÄ⻯һÏÂoracle£¬ÊµÑéʧ°Ü£¬ÀÏÀÏʵʵÈÃoracleÇÖÈëÎÒµÄϵͳ¡£¡£¡£囧
    °²×°Íê ......

OracleÖм¸¸ö¹ØÓÚÈÕÆÚ·½ÃæµÄSQLʵÀý

¡í1:È¡µÃµ±Ç°ÈÕÆÚÊDZ¾Ôµĵڼ¸ÖÜ
SQL> select to_char(sysdate,'YYYYMMDD W HH24:MI:SS') from
dual;

TO_CHAR(SYSDATE,'YY
-------------------
20030327 4 18:16:09

SQL> select to_char(sysdate,'W') from dual;

T
-
4 ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ