OracleÎﻯÊÓͼ
OracleµÄÎﻯÊÓͼÌṩÁËÇ¿´óµÄ¹¦ÄÜ£¬¿ÉÒÔÓÃÓÚÔ¤ÏȼÆËã²¢±£´æ±íÁ¬½Ó»ò¾Û¼¯µÈºÄʱ½Ï¶àµÄ²Ù×÷µÄ½á¹û£¬ÕâÑù£¬ÔÚÖ´Ðвéѯʱ£¬¾Í¿ÉÒÔ±ÜÃâ½øÐÐÕâЩºÄʱµÄ²Ù×÷£¬¶ø´Ó¿ìËٵĵõ½½á¹û¡£ÎﻯÊÓͼÓкܶ෽ÃæºÍË÷ÒýºÜÏàËÆ£ºÊ¹ÓÃÎﻯÊÓͼµÄÄ¿µÄÊÇΪÁËÌá¸ß²éѯÐÔÄÜ£»ÎﻯÊÓͼ¶ÔÓ¦ÓÃ͸Ã÷£¬Ôö¼ÓºÍɾ³ýÎﻯÊÓͼ²»»áÓ°ÏìÓ¦ÓóÌÐòÖÐSQLÓï¾äµÄÕýÈ·ÐÔºÍÓÐЧÐÔ£»ÎﻯÊÓͼÐèÒªÕ¼Óô洢¿Õ¼ä£»µ±»ù±í·¢Éú±ä»¯Ê±£¬ÎﻯÊÓͼҲӦµ±Ë¢Ð¡£
¡¡¡¡ÎﻯÊÓͼ¿ÉÒÔ·ÖΪÒÔÏÂÈýÖÖÀàÐÍ£º°üº¬¾Û¼¯µÄÎﻯÊÓͼ£»Ö»°üº¬Á¬½ÓµÄÎﻯÊÓͼ£»Ç¶Ì×ÎﻯÊÓͼ¡£ÈýÖÖÎﻯÊÓͼµÄ¿ìËÙˢеÄÏÞÖÆÌõ¼þÓкܴóÇø±ð£¬¶ø¶ÔÓÚÆäËû·½ÃæÔòÇø±ð²»´ó¡£´´½¨ÎﻯÊÓͼʱ¿ÉÒÔÖ¸¶¨¶àÖÖÑ¡ÏÏÂÃæ¶Ô¼¸ÖÖÖ÷ÒªµÄÑ¡Ôñ½øÐмòµ¥ËµÃ÷£º
¡¡¡¡´´½¨·½Ê½£¨Build Methods£©£º°üÀ¨BUILD IMMEDIATEºÍBUILD DEFERREDÁ½ÖÖ¡£BUILD IMMEDIATEÊÇÔÚ´´½¨ÎﻯÊÓͼµÄʱºò¾ÍÉú³ÉÊý¾Ý£¬¶øBUILD DEFERREDÔòÔÚ´´½¨Ê±²»Éú³ÉÊý¾Ý£¬ÒÔºó¸ù¾ÝÐèÒªÔÚÉú³ÉÊý¾Ý¡£Ä¬ÈÏΪBUILD IMMEDIATE¡£
¡¡¡¡²éѯÖØд£¨Query Rewrite£©£º°üÀ¨ENABLE QUERY REWRITEºÍDISABLE QUERY REWRITEÁ½ÖÖ¡£·Ö±ðÖ¸³ö´´½¨µÄÎﻯÊÓͼÊÇ·ñÖ§³Ö²éѯÖØд¡£²éѯÖØдÊÇÖ¸µ±¶ÔÎﻯÊÓͼµÄ»ù±í½øÐвéѯʱ£¬Oracle»á×Ô¶¯ÅжÏÄÜ·ñͨ¹ý²éѯÎﻯÊÓͼÀ´µÃµ½½á¹û£¬Èç¹û¿ÉÒÔ£¬Ôò±ÜÃâÁ˾ۼ¯»òÁ¬½Ó²Ù×÷£¬¶øÖ±½Ó´ÓÒѾ¼ÆËãºÃµÄÎﻯÊÓͼÖжÁÈ¡Êý¾Ý¡£Ä¬ÈÏΪDISABLE QUERY REWRITE¡£
¡¡¡¡Ë¢Ð£¨Refresh£©£ºÖ¸µ±»ù±í·¢ÉúÁËDML²Ù×÷ºó£¬ÎﻯÊÓͼºÎʱ²ÉÓÃÄÄÖÖ·½Ê½ºÍ»ù±í½øÐÐͬ²½¡£Ë¢ÐµÄģʽÓÐÁ½ÖÖ£ºON DEMANDºÍON COMMIT¡£ON DEMANDÖ¸ÎﻯÊÓͼÔÚÓû§ÐèÒªµÄʱºò½øÐÐˢУ¬¿ÉÒÔÊÖ¹¤Í¨¹ýDBMS_MVIEW.REFRESHµÈ·½·¨À´½øÐÐˢУ¬Ò²¿ÉÒÔͨ¹ýJOB¶¨Ê±½øÐÐˢС£ON COMMITÖ¸³öÎﻯÊÓͼÔÚ¶Ô»ù±íµÄDML²Ù×÷Ìá½»µÄͬʱ½øÐÐˢС£Ë¢Ðµķ½·¨ÓÐËÄÖÖ£ºFAST¡¢COMPLETE¡¢FORCEºÍNEVER¡£FASTˢвÉÓÃÔöÁ¿Ë¢Ð£¬Ö»Ë¢ÐÂ×ÔÉÏ´ÎË¢ÐÂÒÔºó½øÐеÄÐ޸ġ£COMPLETEˢжÔÕû¸öÎﻯÊÓͼ½øÐÐÍêÈ«µÄˢС£Èç¹ûÑ¡ÔñFORCE·½Ê½£¬ÔòOracleÔÚË¢ÐÂʱ»áÈ¥ÅжÏÊÇ·ñ¿ÉÒÔ½øÐпìËÙˢУ¬Èç¹û¿ÉÒÔÔò²ÉÓÃFAST·½Ê½£¬·ñÔò²ÉÓÃCOMPLETEµÄ·½Ê½¡£NEVERÖ¸ÎﻯÊÓͼ²»½øÐÐÈκÎˢС£Ä¬ÈÏÖµÊÇFORCE ON DEMAND¡£
¡¡¡¡ÔÚ½¨Á¢ÎﻯÊÓͼµÄʱºò¿ÉÒÔÖ¸¶¨ORDER BYÓï¾ä£¬Ê¹Éú³ÉµÄÊý¾Ý°´ÕÕÒ»¶¨µÄ˳Ðò½øÐб£´æ¡£²»¹ýÕâ¸öÓï¾ä²»»áдÈëÎﻯÊÓͼµÄ¶¨ÒåÖУ¬¶øÇÒ¶ÔÒÔºóµÄË¢ÐÂÒ²ÎÞЧ¡£
¡¡¡¡ÎﻯÊÓͼÈÕÖ¾£ºÈç¹ûÐèÒª½øÐпìËÙˢУ¬ÔòÐèÒª½¨Á¢ÎﻯÊÓͼÈÕÖ¾¡£ÎﻯÊÓͼÈÕÖ¾¸ù¾Ý²»Í¬ÎﻯÊÓͼµÄ¿ìËÙË¢Ð
Ïà¹ØÎĵµ£º
oracle±í¿Õ¼ä²Ù×÷Ïê½â
1
2
3×÷Õߣº À´Ô´£º ¸üÐÂÈÕÆÚ£º2006-01-04
5
6
7½¨Á¢±í¿Õ¼ä
8
9CREATE TABLESPACE data01
10DATAFILE '/ora ......
ËäȻѧϰJavaºÜ¾ÃÁË£¬×Ô¼ºÒ²Á¬½Ó¹ýһЩÊý¾Ý¿â£¬±ÈÈçmysqlÖ®ÀàµÄ£¬Èç½ñÄØ£¬Ò²Ñ§Ï°ÁËÒ»¶Îʱ¼äµÄOracle£¬È»¶øÄØ£¬½ñÌìÊÇÎÒµÚÒ»´ÎÁ¬½ÓOracle£¬ºÙºÙ£¬Ó¦¸Ã»¹²»ËãÌ«³Ù°É¡£
½ñÌìÄØ£¬Óе㱿׾£¬´ó¼ÒĪЦ£¡
ÎÒÕâÊÇÒ»¸ö²éѯÀý×Ó
Ê×ÏÈ£¬Ô ......
sysdate+(5/24/60/60) ÔÚϵͳʱ¼ä»ù´¡ÉÏÑÓ³Ù5Ãë
sysdate+5/24/60 ÔÚϵͳʱ¼ä»ù´¡ÉÏÑÓ³Ù5·ÖÖÓ
sysdate+5/24 ÔÚϵͳʱ¼ä»ù´¡ÉÏÑÓ³Ù5Сʱ
sysdate+5 ÔÚϵͳʱ¼ä»ù´¡ÉÏÑÓ³Ù5Ìì
add_months(sysdate,-5) ÔÚϵͳʱ¼ä»ù´¡ÉÏÑÓ³Ù5ÔÂ
add_months(sysdate,-5*12) ÔÚϵͳʱ¼ä»ù´¡ÉÏÑÓ³Ù5Äê
ÉÏÔÂÄ©µÄÈÕÆÚ£ºselect last_day(add_mon ......
Ò»:oracle°æ±¾½éÉÜ:
oracle8
oracle8i ±íʾ´Ëʱoracle¹«Ë¾½ø¾ü»¥ÁªÍø,i´ú±íInternet
oracle9iºÍoracle8iÀàËÆ
oracle10g°üÀ¨ÏÖÔÚµÄ11gʹÓÃÁËÍø¸ñ¼ÆËã,g´ú±ígrid.
¶þ:oracle10g·þÎñ½éÉÜ:
OracleDBConsoleorcl Õâ¸öÊDzÉÓÃä¯ÀÀÆ÷ʹÓõÄoracleÆóÒµ¹ÜÀíÆ÷ (Ò²¾ÍÊÇÄã°²×°µ¯³öµÄÄǸöÍøÒ³)
OracleOraDb10g_home1iSQ ......