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

³£¼ûOracle HINTµÄÓ÷¨

     [×ÊÁÏÀ´×ÔÓÚORACLEƵµÀ http://oracle.chinaitlab.com/induction/398193.html]
  ¡¡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ÖÐûÓÐÌṩ×÷Ϊ²ÎÊýµÄË÷Òý,½«Ñ¡Ôñ³öλͼË÷ÒýµÄ²¼¶û×éºÏ·½Ê½.
¡¡¡¡ÀýÈç:
¡¡¡¡SE


Ïà¹ØÎĵµ£º

ORACLE ´´½¨Êý¾Ý¿âÁ¬½ÓDBLink

CREATE PUBLIC DATABASE LINK ASXT_LINK ;
CONNECT TO ASXT IDENTIFIED BY PASSWORD ;
USING '(DESCRIPTION =(ADDRESS_LIST =(ADDRESS =(PROTOCOL = TCP)(HOST = 192.168.0.100)(PORT = 1521)))(CONNECT_DATA =(SERVICE_NAME = AAA)))'; ......

tabÊý¾Ýת»»µ½oracle spatial

1£ºmapinfoµÄtab¸ñʽÊý¾Ý£¬µ¼Èëµ½oracle spatial
 ´ò¿ªmapinfo £¬
µã»÷¹¤¾ß---¹¤¾ß¹ÜÀíÆ÷
 
¹´Ñ¡easyloader
´ò¿ªeasyloader
ÔÚ¹¤¾ß²Ëµ¥ÉϾͿÉÒÔ¿´µ½easyloader
 µã»÷odbc
µã»÷»úÆ÷Êý¾ÝÔ´£ºÏÂÒ»²½
 
Ñ¡Ôñoralce
 
Êý¾ÝÔ´Ãû³Æ£º×îºÃ¶¼oracle sidÒ»Ñù
ÃèÊö¿ÉÒÔ²»Ð´
Óû§Ãû³Æ£ºoracle ......

ʹÓÃmapviewµ¼shpÊý¾Ýµ½oracle spatial

MapViewer ÊÇÒ»¸ö J2EE ·þÎñ£¬ËüʹÓÃÓÉ Oracle Spatial ¹ÜÀíµÄ¿Õ¼äÊý¾ÝÀ´»æÖƵØͼ¡£MapViewer ÌṩµÄ·þÎñºÍ¹¤¾ßÒþ²ØÁË¿Õ¼äÊý¾Ý²éѯºÍµØͼ²â»æµÄ¸´ÔÓÐÔ£¬Í¬Ê±Îª½Ï¸ß¼¶µÄÓû§Ìṩ¿ÉÒÔ×Ô¶¨ÒåµÄÑ¡Ïî¡£MapViewer Ö¼ÔÚÓë»ùÓÚλÖõķþÎñºÍÓ¦ÓóÌÐòÏ༯³É¡£
µ¥»÷´Ë´¦»ñµÃ Oracle Ó¦Ó÷þÎñÆ÷ MapViewer µÄÆÁÄ»ÕÕƬ¡£
http://www.or ......

J2EEÓ¦ÓÃÖÐÓëOracleÊý¾Ý¿âµÄÁ¬½Ó

ÔÚJ2EEÓ¦ÓóÌÐò¿ª·¢ÖУ¬Ó¦ÓóÌÐòÓëÊý¾Ý¿âÁ¬½ÓµÄ½¨Á¢ÊÇÎÒÃǾ­³£Óöµ½µÄÎÊÌâÖ®Ò»¡£ÔÚÕâÀïÎÒÖ÷Ҫ̸̸ÔÚ±¾µØÓ¦ÓóÌÐòÖÐͨ¹ýOCI·½Ê½¡¢thin·½Ê½ºÍJdbcOdbcÇÅ·½Ê½Á¬½ÓOracleÊý¾Ý¿â£¬ÔÚiPlanet Application Server 6.5ºÍSun Java System Application Server 7ÖжÔOracleÊý¾Ý¿âÁ¬½Ó³ØµÄÅäÖÃÒÔ¼°Ó¦ÓÃÖÐÈçºÎ´ÓÁ¬½Ó³ØÖлñµÃÁ¬½Ó
Ò»¡¢±¾µ ......

oracle sqlÃæÊÔÌâ2

Ò»£®¼òµ¥SQL²éѯ£º
1£©:ͳ¼Æÿ¸ö²¿ÃÅÔ±¹¤µÄÊýÄ¿
select dept,count(*) from employee group by dept;
2£©:ͳ¼Æÿ¸ö²¿ÃÅÔ±¹¤µÄÊýÄ¿´óÓÚÒ»¸öµÄ¼Ç¼
select dept,count(*) from employee group by dept having count(*)>1;
3£©:ͳ¼Æ¹¤×ʳ¬¹ý1200µÄÔ±¹¤ËùÔÚ²¿ÃŵÄÃû³Æ
select e.first_name,salary,d.name
from s_emp ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ