Oracle ²åÈë×ܽá
Oracle ÏòÒ»¸ö±íÖвåÈëÊý¾ÝµÄÁ½ÖÖ·½Ê½£º
Conventional Insert Operations£º´«Í³²åÈë»áÓÅÏÈʹÓøßˮλ֮Ï£¬»á±£Ö¤Êý¾ÝÓ¦ÓÃÍêÕûÐÔ£º¸ßˮλ֮ÏÂÊÇÖ¸£ºÉ¾³ýÖ®ºóµÄÊ£Óà¿Õ¼ä£¬¸ßˮλ֮ÉÏÊÇÖ¸£º´ÓÀ´Ã»ÓÐÓùýµÄ´¦Å®¿é¡£
Direct-path Insert Operations:Êý¾Ý²åÈë»áÀûÓøßˮλ֮ÉÏ£¬²»Óøßˮλ֮Ï¡£²ÉÓÃAppends×·¼Ó·½Ê½¡¢²»¾¹ýBuffer Catch Õâ¸ö¹ý³Ì»á´ó´óÌá¸ßÐÔÄÜ¡£
Dircet-Load ¹¤×÷ģʽ
1 Serial Direct-path Insert £ºSingle proces Insert (Ó÷ÖÇø»òû·ÖÇø)Ò»¸ö½ø³Ì¡£²åÈë֮ǰÊDz»»áÓøßˮλ֮ϵĿ顣ËùÒÔ²åÈëÇ°Òªrebuild ±íʹ¸ßˮϵĿé½áÊø¿Õ״̬
2 Parallel Direct-path Insert£¨Ó÷ÖÇø£© £º¶à½ø³Ì²¢ÐвåÈë·ÖÇø±í¡£Ò»¸ö·ÖÇøÉÏ¿ÉÓöà¸ö½ø³Ì£¬µ«ÊÇÒ»¸ö½ø³Ì²»ÄܽøÈë¶à¸öÇø¡£ºÍ1ÖÖ·½Ê½Ò»Ñù¡¢
3 Parallel Direct-path Insert £¨·Ç·ÖÇø£©£º¶à½ø³Ì²¢ÐвåÈë·Ç·ÖÇø±í¡£Ã¿¸öÐèÒª¸É»îµÄ½ø³Ì»á·ÖÒ»¸öÁÙʱµÄsegment¡£×îºó»áÓÐÒ»¸öе÷Õß½ø³Ì°ÑsegmentºÏ²¢Òƶ¯µ½primary table segment ÉÏ¡£
¾ßÌ壺
1 £¨´®ÐУ© £ºinsert /*+Append*/ into temp nologging select * from all_objects;
/*+Append*/ :£¨´®ÐУ©¿é¿½±´Ö±½ÓʹÓøßˮλ¡£
ÐèÒªcommit ºóÔÚ²éѯ¡£
2 £¨²¢Ðк¬·ÖÇø£©£ºÄ¬ÈϾÍÊÇ/*+Append*/
Alter sesion enable parallel DML;
INSERT /*+Parallel £¨Óû§.±í, ·ÖÇøÊý£©*/ into ±í nologging select * from Ô´±í¡£
Èç¹ûÊÇ·ÖÇø±ínologgingģʽºÍÖ÷±íµÄnologging Ò»Ñù
Ò»¸ö±íµÄnologging ÊǺÍËüËùÔÚ±í¿Õ¼äµÄËùÔÚ±í¿Õ¼äÊÇÒ»ÑùµÄ¡£
¿ÉÒԸıäËùÔÚ±í¿Õ¼äµÄnologging¸Ä±äÆäϵıíµÄnologgingģʽ
set autot :¿ÉÒԲ鿴Statistics loggingÈÕÖ¾
²»¹ýÕâÑùnologgingÊÇûÓÐÓõġ£¿ÉÒÔʹÓÃalter table xxx nologging£»
ÔÚinsert /*+Append*/ into temp nologging select * from all_objects; ÊÇ»á²úÉúredo size·Ç³£µÄÉÙ¡¢
Ïà¹ØÎĵµ£º
OracleжÔØж²»¸É¾»£¬Oracle³¹µ×ɾ³ýµÄ°ì·¨(winxp)
OracleжÔØж²»¸É¾»£¬Oracle³¹µ×ɾ³ýµÄ°ì·¨(winxp)
ÓÃoracleµÄжÔسÌÐò²¢²»ÄÜÍêȫжÔظɾ»¡£Èç֮ǰµÄÃüÃûµÄoracle sid ²»ÄÜÔÙʹÓ᣻áÌáʾsid´æÔÚ¡£ÏÂÃæÊÇÔÚwinxpÏÂÍêȫжÔØoracleµÄ·½·¨¡£
1¡¢¿ªÊ¼££¾ÉèÖ㣾¿ØÖÆÃæ°å££¾¹ÜÀí¹¤¾ß££¾·þÎñ
&nbs ......
£¨1£©ÒÔSYSÉí·ÝµÇ½
conn sys/sysem_pwd as sysdba;
£¨2£©´´½¨amlyÓû§
create user amly identified by 9imly;
£¨3£©´´½¨±í¿Õ¼ä
create tablespace ts_amly datafile 'd:\amlyfile\test.dbf' size 100M;
£¨4£©½«±í¿Õ¼ä·ÖÅä¸øÓû§
alter user amly default tablespace ts_amly;
£¨5£©¸øÓû§ÊÚȨ
grant create sess ......
ÔÎÄ´«ËÍÃÅ£ºhttp://topic.csdn.net/u/20091019/11/67cd55a3-3f42-4db7-a3f8-91dd52a913cd.html?24122
¾³£Óöµ½·¢ÌûÇóÐÐÁÐת»»µÄ´úÂ룬ÓÃmax(decode(..))»Ø¸´ºó£¬Ê®Óа˾ŻáÔÙÎÊÒ»¾ä£ºÈç¹ûÁÐÃû²»¹Ì¶¨£¬»òÕßÁÐÊý²»¹Ì¶¨Ôõô°ì¡£¾ÍÒªÓô洢¹ý³ÌÀ´Ð´£¬ÕâЩ´æ´¢¹ý³ÌµÄ´úÂ붼´óͬСÒ죬ÎÒ¾ÍÏëÄܲ»ÄÜд¸öͨÓõãµÄ¹ý³Ì
ÊÔÁ ......