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

³£¼ûOracle HINTµÄÓ÷¨

¡¡1. /*+ALL_ROWS*/
¡¡¡¡±íÃ÷¶ÔÓï¾ä¿éÑ¡Ôñ»ùÓÚ¿ªÏúµÄÓÅ»¯·½·¨,²¢»ñµÃ×î¼ÑÍÌÍÂÁ¿,ʹ×ÊÔ´ÏûºÄ×îС»¯.
¡¡¡¡ÀýÈç:
¡¡¡¡SELECT /*+ALL+_ROWS*/ EMP_NO,EMP_NAM,DAT_IN from BSEMPMS WHERE EMP_NO='SCOTT';
¡¡¡¡2. /*+FIRST_ROWS*/
¡¡¡¡±íÃ÷¶ÔÓï¾ä¿éÑ¡Ôñ»ùÓÚ¿ªÏúµÄÓÅ»¯·½·¨,²¢»ñµÃ×î¼ÑÏìӦʱ¼ä,ʹ×ÊÔ´ÏûºÄ×îС»¯.
¡¡¡¡ÀýÈç:
¡¡¡¡SELECT /*+FIRST_ROWS*/ EMP_NO,EMP_NAM,DAT_IN from BSEMPMS WHERE EMP_NO='SCOTT';
¡¡¡¡3. /*+CHOOSE*/
¡¡¡¡±íÃ÷Èç¹ûÊý¾Ý×ÖµäÖÐÓзÃÎʱíµÄͳ¼ÆÐÅÏ¢,½«»ùÓÚ¿ªÏúµÄÓÅ»¯·½·¨,²¢»ñµÃ×î¼ÑµÄÍÌÍÂÁ¿;
¡¡¡¡±íÃ÷Èç¹ûÊý¾Ý×ÖµäÖÐûÓзÃÎʱíµÄͳ¼ÆÐÅÏ¢,½«»ùÓÚ¹æÔò¿ªÏúµÄÓÅ»¯·½·¨;
¡¡¡¡ÀýÈç:
¡¡¡¡SELECT /*+CHOOSE*/ EMP_NO,EMP_NAM,DAT_IN from BSEMPMS WHERE EMP_NO='SCOTT';
¡¡¡¡4. /*+RULE*/
¡¡¡¡±íÃ÷¶ÔÓï¾ä¿éÑ¡Ôñ»ùÓÚ¹æÔòµÄÓÅ»¯·½·¨.
¡¡¡¡ÀýÈç:
¡¡¡¡SELECT /*+ RULE */ EMP_NO,EMP_NAM,DAT_IN from BSEMPMS WHERE EMP_NO='SCOTT';
¡¡¡¡5. /*+FULL(TABLE)*/
¡¡¡¡±íÃ÷¶Ô±íÑ¡ÔñÈ«¾ÖɨÃèµÄ·½·¨.
¡¡¡¡ÀýÈç:
¡¡¡¡SELECT /*+FULL(A)*/ EMP_NO,EMP_NAM from BSEMPMS A WHERE EMP_NO='SCOTT';
¡¡¡¡6. /*+ROWID(TABLE)*/
¡¡¡¡ÌáʾÃ÷È·±íÃ÷¶ÔÖ¸¶¨±í¸ù¾ÝROWID½øÐзÃÎÊ.
¡¡¡¡ÀýÈç:
¡¡¡¡SELECT /*+ROWID(BSEMPMS)*/ * from BSEMPMS WHERE ROWID>='AAAAAAAAAAAAAA'
¡¡¡¡AND EMP_NO='SCOTT';
¡¡¡¡7. /*+CLUSTER(TABLE)*/
¡¡¡¡ÌáʾÃ÷È·±íÃ÷¶ÔÖ¸¶¨±íÑ¡Ôñ´ØɨÃèµÄ·ÃÎÊ·½·¨,ËüÖ»¶Ô´Ø¶ÔÏóÓÐЧ.
¡¡¡¡ÀýÈç:
¡¡¡¡SELECT /*+CLUSTER */ BSEMPMS.EMP_NO,DPT_NO from BSEMPMS,BSDPTMS
¡¡¡¡WHERE DPT_NO='TEC304' AND BSEMPMS.DPT_NO=BSDPTMS.DPT_NO;
¡¡¡¡8. /*+INDEX(TABLE INDEX_NAME)*/
¡¡¡¡±íÃ÷¶Ô±íÑ¡ÔñË÷ÒýµÄɨÃè·½·¨.
¡¡¡¡ÀýÈç:
¡¡¡¡SELECT /*+INDEX(BSEMPMS SEX_INDEX) USE SEX_INDEX BECAUSE THERE ARE FEWMALE BSEMPMS */ from BSEMPMS WHERE SEX='M';
¡¡¡¡9. /*+INDEX_ASC(TABLE INDEX_NAME)*/
¡¡¡¡±íÃ÷¶Ô±íÑ¡ÔñË÷ÒýÉýÐòµÄɨÃè·½·¨.
¡¡¡¡ÀýÈç:
¡¡¡¡SELECT /*+INDEX_ASC(BSEMPMS PK_BSEMPMS) */ from BSEMPMS WHERE DPT_NO='SCOTT';
¡¡¡¡10. /*+INDEX_COMBINE*/
¡¡¡¡ÎªÖ¸¶¨±íÑ¡Ôñλͼ·ÃÎÊ·¾­,Èç¹ûINDEX_COMBINEÖÐûÓÐÌṩ×÷Ϊ²ÎÊýµÄË÷Òý,½«Ñ¡Ôñ³öλͼË÷ÒýµÄ²¼¶û×éºÏ·½Ê½.
¡¡¡¡ÀýÈç:
¡¡¡¡SELECT /*+INDEX_COMBINE(BSEMPMS SAL_BMI HIREDATE_BMI)*/ * from BSEMPMS
¡¡¡¡WHERE SAL<5000000 AND HIREDATE


Ïà¹ØÎĵµ£º

Oracle´´½¨±í¿Õ¼ä¡¢´´½¨Óû§ÒÔ¼°ÊÚȨ¡¢²é¿´È¨ÏÞ

´´½¨ÁÙʱ±í¿Õ¼ä
CREATE TEMPORARY TABLESPACE test_temp
TEMPFILE 'C:\oracle\product\10.1.0\oradata\orcl\test_temp01.dbf'
SIZE 32M
AUTOEXTEND ON
NEXT 32M MAXSIZE 2048M
EXTENT MANAGEMENT LOCAL;
´´½¨Óû§±í¿Õ¼ä
CREATE TABLESPACE test_data
LOGGING
DATAFILE 'C:\ORACLE\PRODUCT\10.1.0\ORADATA\ORCL\TE ......

Oracle SQL DeveloperÓëPL/SQL Developer±È½Ï¡¾×ª¡¿

¸½:Oracle SQL Developer — À©Õ¹½»Á÷ÖÐÐÄ
http://www.oracle.com/technology/global/cn/products/database/sql_developer/files/extensions.htm
      ֮ǰ×÷Ϊһ¸öOracle Employee£¬È´×ÜÊÇÔÚʹÓÃPL/SQL Developer£¨¶øÇÒÊÇÆƽâ°æ£©£¬ÕâʵÔÚÓÐЩ˵²»¹ýÈ¥£¬µ«ÊÇÈçºÎÕÒµ½Ò»¸öºÏÐijÃÊÖµÄÄܹ»Ô ......

oracleÖÐemp±íµÄÄÚÁ¬½Ó,×óÍâÁ¬½Ó,ÓÒÍâÁ¬½Ó,È«ÍâÁ¬½Ó

EMP±íÖÐÔ±¹¤ÓëÀÏ°åµÄ¹Øϵ
ÄÚÁ¬½Ó£º
        
ÄÚÁ¬½ÓÒ²½Ð×ÔÈ»Á¬½Ó£¬ËüÊÇ×éºÏÁ½¸ö±íµÄ³£Ó÷½·¨¡£×ÔÈ»Á¬½Ó½«Á½¸ö±íÖеÄÁнøÐбȽϣ¬½«Á½¸ö±íÖÐÂú×ãÁ¬½ÓÌõ¼þµÄÐÐ×éºÏÆðÀ´£¬×÷Ϊ½á¹û¡£×ÔÈ»Á¬½ÓÓÐÁ½ÖÖÐÎʽµÄÓï·¨¡£
select e1.ename,e1.mgr,e2.ename aa from emp e1,emp e2 where e1. ......

oracle ÅäÖø߼¶¸´ÖÆ»·¾³Óöµ½µÄÎÊÌâ

1¡¢ÔÚ±¾»ú69ÉÏ´´½¨Êý¾Ý¿âorcl £¬global_name=orcl£¬Ê¹ÓÃÓï¾ä
alter database rename global_name to orcl.us.oracle.com ÐÞ¸ÄÊý¾Ý¿âµÄÈ«¾ÖÊý¾Ý¿âÃûΪorcl.us.oracle.com
2¡¢ÔÚÐé»ú188ÉÏ´´½¨Êý¾Ý¿âviotest£¬global_name=viotest£¬Ê¹ÓÃÓï¾ä
alter database rename global_name to viotest.us.oracle.com ÐÞ¸ÄÊý¾Ý¿âµÄÈ«¾ÖÊ ......

oracleµÄlicenseºÍÕý°æʹÓÃÎÊÌâ

oracleµÄlicenseºÍÕý°æʹÓÃÎÊÌâ
url:http://blog.csdn.net/outget1/archive/2009/10/15/4675028.aspx
2008-06-30 23:42
1, Õý°æOracle ²úÆ·ºÍµÁ°æµÄÇø±ð
Ö±±¼Ö÷Ì⣬ÕâÊÇÐí¶àÑз¢²»×¢ÒâµÄµØ·½¡£¶ÔÓÚÉÌÓ㨾ÍÊÇÄã²»ÊÇÔÚ¼ÒÀ×Ô¼ºÍ棩£¬ÑϸñÀ´Ëµ£¬¾ÍÊÇÒ»ÕÅÐí¿ÉÖ¤Ö½µÄÇø±ð¡£²»¹ÜÊÇʲôʱºò£¬ÏÂÔصİ汾¶¼¿ÉÒÔ½¨Á¢Êý¾Ý¿â²¢ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ