OracleÁÙʱ±í
Temporary TablesÁÙʱ±í
1¼ò½é
ORACLEÊý¾Ý¿â³ýÁË¿ÉÒÔ±£´æÓÀ¾Ã±íÍ⣬»¹¿ÉÒÔ½¨Á¢ÁÙʱ±ítemporary tables¡£ÕâЩÁÙʱ±íÓÃÀ´±£´æÒ»¸ö»á»°SESSIONµÄÊý¾Ý£¬
»òÕß±£´æÔÚÒ»¸öÊÂÎñÖÐÐèÒªµÄÊý¾Ý¡£µ±»á»°Í˳ö»òÕßÓû§Ìá½»commitºÍ»Ø¹örollbackÊÂÎñµÄʱºò£¬ÁÙʱ±íµÄÊý¾Ý×Ô¶¯Çå¿Õ£¬
µ«ÊÇÁÙʱ±íµÄ½á¹¹ÒÔ¼°ÔªÊý¾Ý»¹´æ´¢ÔÚÓû§µÄÊý¾Ý×ÖµäÖС£
ÁÙʱ±íÖ»ÔÚoracle8iÒÔ¼°ÒÔÉϲúÆ·ÖÐÖ§³Ö¡£
2Ïêϸ½éÉÜ
OracleÁÙʱ±í·ÖΪ »á»°¼¶ÁÙʱ±í ºÍ ÊÂÎñ¼¶ÁÙʱ±í¡£
»á»°¼¶ÁÙʱ±íÊÇÖ¸ÁÙʱ±íÖеÄÊý¾ÝÖ»ÔڻỰÉúÃüÖÜÆÚÖ®ÖдæÔÚ£¬µ±Óû§Í˳ö»á»°½áÊøµÄʱºò£¬Oracle×Ô¶¯Çå³ýÁÙʱ±íÖÐÊý¾Ý¡£
ÊÂÎñ¼¶ÁÙʱ±íÊÇÖ¸ÁÙʱ±íÖеÄÊý¾ÝÖ»ÔÚÊÂÎñÉúÃüÖÜÆÚÖдæÔÚ¡£µ±Ò»¸öÊÂÎñ½áÊø£¨commit or rollback£©£¬Oracle×Ô¶¯Çå³ýÁÙʱ±íÖÐÊý¾Ý¡£
ÁÙʱ±íÖеÄÊý¾ÝÖ»¶Ôµ±Ç°SessionÓÐЧ£¬Ã¿¸öSession¶¼ÓÐ×Ô¼ºµÄÁÙʱÊý¾Ý£¬²¢ÇÒ²»ÄÜ·ÃÎÊÆäËüSessionµÄÁÙʱ±íÖеÄÊý¾Ý¡£Òò´Ë£¬ÁÙʱ±í²»ÐèÒªDMLËø.µ±Ò»¸ö»á»°½áÊø(Óû§Õý³£Í˳ö Óû§²»Õý³£Í˳ö ORACLEʵÀý±ÀÀ£)»òÕßÒ»¸öÊÂÎñ½áÊøµÄʱºò£¬Oracle¶ÔÕâ¸ö»á»°µÄ±íÖ´ÐÐ TRUNCATE Óï¾äÇå¿ÕÁÙʱ±íÊý¾Ý.µ«²»»áÇå¿ÕÆäËü»á»°ÁÙʱ±íÖеÄÊý¾Ý.
Äã¿ÉÒÔË÷ÒýÁÙʱ±íºÍÔÚÁÙʱ±í»ù´¡ÉϽ¨Á¢ÊÓͼ.ͬÑù,½¨Á¢ÔÚÁÙʱ±íÉϵÄË÷ÒýÒ²ÊÇÁÙʱµÄ,Ò²ÊÇÖ»¶Ôµ±Ç°»á»°»òÕßÊÂÎñÓÐЧ.
ÁÙʱ±í¿ÉÒÔÓµÓд¥·¢Æ÷.
3½¨Á¢ÁÙʱ±í
ÁÙʱ±íµÄ¶¨Òå¶ÔËùÓлỰSESSION¶¼ÊǿɼûµÄ,µ«ÊDZíÖеÄÊý¾ÝÖ»¶Ôµ±Ç°µÄ»á»°»òÕßÊÂÎñÓÐЧ.
½¨Á¢·½·¨:
1) ON COMMIT DELETE ROWS ¶¨ÒåÁ˽¨Á¢ÊÂÎñ¼¶ÁÙʱ±íµÄ·½·¨.
CREATE GLOBAL TEMPORARY TABLE admin_work_area
(startdate DATE,
enddate DATE,
class CHAR(20))
ON COMMIT DELETE ROWS;
EXAMPLE:
SQL> CREATE GLOBAL TEMPORARY TABLE admin_work_area
2 (startdate DATE,
3 enddate DATE,
4 class CHAR(20))
5 &nb
Ïà¹ØÎĵµ£º
ÔÎĵØÖ·£ºhttp://www.cnblogs.com/wangxiaohuo/archive/2008/04/20/1162631.html
±¾ÎĵµÖ÷Òª´ÓoracleÓësql serverÓï·¨ÉϽøÐвîÒìÐԱȽϣ¬ÖîÈçÁ½ÕßÔÚ¹ÜÀí£¬ÐÔÄÜ£¬ÓÅ»¯µÈ·½ÃæµÄ²îÒì²»×÷±È½Ï¡£
¡ñ¸ÅÄîÉÏÇø±ð
1.Oracle ÊÇÒ»ÖÖ¶ÔÏó¹ØϵÊý¾Ý¿â¹ÜÀíϵͳ£¨ORDBMS),¶øSql server Ö»ÊǹØϵÐÍÊý¾Ý¿â¹Ü
&nbs ......
ÒÔÏÂÒÔ½ØͼÐÎʽ¼òÊö¹ØÓÚÔÚIBMСÐÍ»úÉÏ°²×°µ¥»ú°æOracleÊý¾Ý¿âµÄ¹ý³Ì¡£ÒÔ¹©´ó¼Ò²Î¿¼£¬ÒÔ±ã¶ÔÓÚIBMСÐÍ»ú&AIX&Oracle½øÐгõ²½µÄÁ˽⡣ Machine£ºIBM POWER 520 OS&Version£ºAIX_5300-07 Oracle Version:10.2.0.1 ÒÔÏÂÊÇÏêϸ½Øͼ£º 1_OS_Check&Filesets_Check 2_ÀûÓÃsmitty installpÃüÁî½øÈëÈí¼þ£¨°ü£ ......
red hat linux Ï°²×° oracle 10g
racle¿¼×ÊÁÏ:
Oracle¹Ù·½ÍøÕ¾: http://download.oracle.com/docs/html/B10813_01/toc.htm
Ò»¡¢ÒÔrootÓû§µÇ¼, ½øÐÐÈçϲÙ×÷£º
1 ¼ì²éÓ²¼þÒªÇó
* Ö÷Òª°üÀ¨£º
********************************************************************
* ÄÚ´æ: & ......
alert index mem_ct monitoring usage;
desc v$object_usage;
set linesize 190
select * from v$object_usage;
SQL>SET AUTOTRACE ON;
¡¡¡¡*autotrace¹¦ÄÜÖ»ÄÜÔÚSQL*PLUSÀïʹÓÃ
¡¡¡¡ÆäËûһЩʹÓ÷½·¨£º
¡¡¡¡2.2.1¡¢ÔÚSQLPLUSÖеõ½Óï¾ä×ܵÄÖ´ÐÐʱ¼ä
¡¡¡¡SQL> set timing on;
2.2.2¡¢Ö»ÏÔʾִÐмƻ®--(»áÍ¬Ê ......