Oracle ´´½¨ÐòÁÐ
Oracle ´´½¨ÐòÁУº
create sequence SEQ_Tablename_id
increment by 1 --ÿ´ÎÔö¼Ó1
start with 1 --´Ó1¿ªÊ¼
nomaxvalue --ûÓÐ×î´óÖµ
nocache;
Oracle ²éѯÐòÁУº
select SEQ_Tablename_id.nextvalue from dual
Ïà¹ØÎĵµ£º
¡¡
¡¡
DML Data manipulation language
SELECT
SELECT [DISTINCT] *|ÁÐxx [AS] "±ðÃûxx"[,ÁÐxx "±ðÃûxx"...]
×Ö·û´®Á¬½Ó·û ||, ×Ö·û»òÈÕÆÚÀàÐ͵Ä×Ö·û´®Óõ¥ÒýºÅ’’, ÁбðÃûÓÃË«ÒýºÅ“”¡£Èç¹û±ðÃûÖÐÓпոñ¡¢ÌØÊâ×Ö·û»òÕßÒªÇóÇø·Ö´óСд£¬±ØÐëÓÃË«ÒýºÅ¡£Ä¬ÈÏÇé¿öÏÂÁбêÌâΪ´óд£¬ ......
µ±LGWR´¦ÓÚ¿ÕÏÐ״̬ʱ£¬ËüÒÀÀµÓÚrdbms rpc messageµÈ´ýʼþ£¬´¦ÓÚÐÝÃß״̬£¬Ö±µ½ÈýÃëʱ¼äµ½£¬Èç¹ûÕâ¸öʱºòLGWR·¢ÏÖÓÐRedoÐÅÏ¢ÐèҪд³öµÄ»°£¬ÄÇôLGWR½«Ö´ÐÐдµÄ²Ù×÷£¬log file parallel writeµÈ´ýʼþ½«»á³öÏÖ¡£
¡¡¡¡×ܽáÒ»ÏÂRedoдµÄ´¥·¢Ìõ¼þ£º
¡¡¡¡1£¬Ã¿ÈýÃëÖÓ³¬Ê±(timeout)£º
µ±LGWR´¦ÓÚ¿ÕÏÐ״̬ʱ£¬ËüÒÀÀµÓÚrdbms r ......
http://www.anysql.net/oracle/query_rewrite_01.html
Query Rewrite ÔÚÊý¾Ý²Ö¿âÊÇÊÇÒ»¸ö·Ç³£ÓÐÓõļ¼Êõ, TomÔÚ<<Effective Oracle by Design>>Ò»ÊéÖн«ÊµÌ廯ÊÓͼ(MView)³ÆΪÊÇÊý¾Ý²Ö¿âµÄË÷Òý, ÕâÊÇÔÙÌùÇв»¹ýµÄÁË, ÔÚOLTPÖе±SELECTÓï¾äµÄËùÓеÄ×ֶζ¼ÔÚË÷ÒýÖÐʱ, Oracle¿ÉÒÔ²»´Ó±í¶ÁÊý¾Ý, ¶øÖ± ......
¶ÔÓÚÒ»¸ö¸ø¶¨µÄSQL, ºÍÏÖÓеÄMVIEW, Õâ¸öSQL¿ÉÄܱ»Rewrite, Ò²¿ÉÄܲ»Äܱ»Rewrite, ÈçºÎÕÒ³öÕâÆäÖеÄÔÒòÄØ, ¿¿¾Ñé¿ÉÒÔ½â¾öһЩÎÊÌâ, ²»¹ýËù»¨µÄʱ¼ä¾ÍÒª³¤Ò»µãÁË. ÆäʵÔÚOracleÖÐÌṩÁËÒ»¸öº¯Êý¿ÉÒÔÓÃÓÚ½âÊÍΪʲôij¸öSQL²»Äܱ»ÖØд, Õâ¸ö¹ý³ÌλÓÚdbms_mviewÕâ¸ö°üÖÐ, ¹ý³ÌÃûΪexplain_rewrite, ÓÐÁËÕâ¸ö¹¤¾ß, ¿ÉÒ ......