ORACLE ÁÙʱ±í¿Õ¼äʹÓÃÂʹý¸ßµÄÔÒò¼°½â¾ö·½°¸
ORACLE ÁÙʱ±í¿Õ¼äʹÓÃÂʹý¸ßµÄÔÒò¼°½â¾ö·½°¸(2009-11-14 19:59:02)
±êÇ©£ºoracle ÁÙʱ±í¿Õ¼ä ʹÓÃÂÊ100 ½â¾ö·½°¸ it
·ÖÀࣺ¼¼Êõ²©ÂÛ
ÔÚÊý¾Ý¿âµÄÈÕ³£Ñ§Ï°ÖУ¬·¢ÏÖ¹«Ë¾Éú²úÊý¾Ý¿âµÄĬÈÏÁÙʱ±í¿Õ¼ätempʹÓÃÇé¿ö´ïµ½ÁË30G£¬Ê¹ÓÃÂÊ´ïµ½ÁË100%£» ´ýµ÷ÕûΪ32Gºó£¬Ê¹ÓÃÂÊ»¹ÊÇΪ100%£¬µ¼Ö´ÅÅÌ¿Õ¼äʹÓýôÕÅ¡£¸ù¾ÝÁÙʱ±í¿Õ¼äµÄÖ÷ÒªÊǶÔÁÙʱÊý¾Ý½øÐÐÅÅÐòºÍ»º´æÁÙʱÊý¾ÝµÈÌØÐÔ£¬´ýÖØÆôÊý¾Ý¿âºó£¬ temp»á×Ô¶¯ÊÍ·Å¡£ÓÚÊÇÏëͨ¹ýÖØÆôÊý¾Ý¿âµÄ·½Ê½À´»º½âÕâÖÖÇé¿ö£¬µ«ÊÇÖØÆôÊý¾Ý¿âÖ®ºó£¬·¢ÏÖÁÙʱ±í¿Õ¼ätempµÄʹÓÃÂÊ»¹ÊÇ100%£¬Ò»µãû±ä¡£ËäÈ»ÔËÐÐ ÖÐÓ¦ÓÃÔÝʱûÓб¨Ê²Ã´´íÎ󣬵«ÊÇÕâÔÚÒ»¶¨³Ì¶ÈÉÏ´æÔÚÒ»¶¨µÄÒþ»¼£¬Óдý½â¾ö¸ÃÎÊÌâ¡£ÓÉÓÚÁÙʱ±í¿Õ¼äÖ÷ҪʹÓÃÔÚÒÔϼ¸ÖÖÇé¿ö£º
1¡¢order by or group by (disc sortÕ¼Ö÷Òª²¿·Ö)£»
2¡¢Ë÷ÒýµÄ´´½¨ºÍÖØ´´½¨£»
3¡¢distinct²Ù×÷£»
4¡¢union & intersect & minus sort-merge joins£»
5¡¢Analyze ²Ù×÷£»
6¡¢ÓÐЩÒì³£Ò²»áÒýÆðTEMPµÄ±©ÕÇ¡£
OracleÁÙʱ±í¿Õ¼ä±©ÕǵÄÏÖÏó¾¹ý·ÖÎö¿ÉÄÜÊÇÒÔϼ¸¸ö·½ÃæµÄÔÒòÔì³ÉµÄ£º
1. ûÓÐΪÁÙʱ±í¿Õ¼äÉèÖÃÉÏÏÞ£¬¶øÊÇÔÊÐíÎÞÏÞÔö³¤¡£µ«ÊÇÈç¹ûÉèÖÃÁËÒ»¸öÉÏÏÞ£¬×îºó¿ÉÄÜ»¹ÊÇ»áÃæÁÙÒòΪ¿Õ¼ä²»¹»¶ø³ö´íµÄÎÊÌ⣬ÁÙʱ±í¿Õ¼äÉèÖÃ̫С»áÓ°ÏìÐÔÄÜ£¬ÁÙʱ±í¿Õ¼ä¹ý´óͬÑù»áÓ°ÏìÐÔÄÜ£¬ÖÁÓÚÐèÒªÉèÖÃΪ¶à´óÐèÒª×ÐϸµÄ²âÊÔ¡£
2.²éѯµÄʱºòÁ¬±í²éѯÖÐʹÓõıí¹ý¶àÔì³ÉµÄ¡£ÎÒÃÇÖªµÀÔÚÁ¬±í²éѯµÄʱºò£¬¸ù¾Ý²éѯµÄ×ֶκͱíµÄ¸öÊý»áÉú³ÉÒ»¸öµÏ˹¿¨¶û»ý£¬Õâ¸öµÏ˹¿¨¶û»ýµÄ´óС¾ÍÊÇÒ»´Î²éѯÐèÒªµÄÁÙʱ¿Õ¼äµÄ´óС£¬Èç¹û²éѯµÄ×ֶιý¶àºÍÊý¾Ý¹ý´ó£¬ÄÇô¾Í»áÏûºÄ·Ç³£´óµÄÁÙʱ±í¿Õ¼ä¡£
3.¶Ô²éѯµÄijЩ×Ö¶ÎûÓн¨Á¢Ë÷Òý¡£OracleÖУ¬Èç¹û±íûÓÐË÷Òý£¬ÄÇô»á½«ËùÓеÄÊý¾Ý¶¼¸´ÖƵ½ÁÙʱ±í¿Õ¼ä£¬¶øÈç¹ûÓÐË÷ÒýµÄ»°£¬Ò»°ãÖ»Êǽ«Ë÷ÒýµÄÊý¾Ý¸´ÖƵ½ÁÙʱ±í¿Õ¼äÖС£
Õë¶ÔÒÔÉϵķÖÎö£¬¶Ô²éѯµÄÓï¾äºÍË÷Òý½øÐÐÁËÓÅ»¯£¬Çé¿öµÃµ½»º½â£¬µ«ÊÇÐèÒª½øÒ»²½²âÊÔ¡£
×ܽ᣺
1.SQLÓï¾äÊÇ»áÓ°Ïìµ½´ÅÅ̵ÄÏûºÄµÄ£¬²»µ±µÄÓï¾ä»áÔì³É´ÅÅ̱©ÕÇ¡£
2.¶Ô²éѯÓï¾äÐèÒª×ÐϸµÄ¹æ»®£¬²»ÒªÏ뵱ȻµÄÈ¥¶¨ÒåÒ»¸ö²éѯÓï¾ä£¬ÌرðÊÇÔÚ¿ÉÒÔÌṩÓû§×Ô¶¨Òå²éѯµÄÈí¼þÖС£
3.×Ðϸ¹æ»®±íË÷Òý¡£Èç¹ûÁÙʱ±í¿Õ¼äÊÇtemporaryµÄ£¬¿Õ¼ä²»»áÊÍ·Å£¬Ö»ÊÇÔÚsort½áÊøºó±»±ê¼ÇΪfreeµÄ£¬Èç¹ûÊÇ permanentµÄ£¬ÓÉSMON¸ºÔðÔÚsort½áÊøºóÊÍ·Å£¬¶¼²»ÓÃÈ¥ÊÖ¹¤Êͷŵġ£²é¿´ÓÐÄÄЩÓû§ºÍSQLµ¼ÖÂTEMPÔö³¤µÄÁ½¸öÖØÒªÊÓͼ£ºv$ sort_usageºÍv$sort_segment¡£
ͨ¹ý²éѯÏà¹ØµÄ×ÊÁÏ£¬·¢ÏÖ½â¾
Ïà¹ØÎĵµ£º
Êý¾Ý¿â²éѯÖÐÄÑÃâ»áÓöµ½ÐÐÁÐת»»µÄÇé¿ö£¬ÕªÁÐһЩ½Ï¾«µäµÄ½â¾ö·½°¸
--####################################################################
Ò»¡¢²ÉÓÃSQL decodeºÍPL/SQLº¯ÊýʵÏÖ
--####################################################################
1¡¢¹Ì¶¨ÁÐÊýµÄÐÐÁÐת»»
Èç
student subject grade
------ ......
µÚÒ»ÖÖÇé¿ö£ºÎÞ·µ»ØÖµ.
create or replace procedure test_a(param1 in varchar2,param2 in varchar2) as
begin
insert into test value(param1,param2);
&nb ......
À´Ô´£¨http://www.javaeye.com/topic/190221£©
Ò»¡¢ ³£ÓÃÈÕÆÚÊý¾Ý¸ñʽ
1.Y»òYY»òYYY ÄêµÄ×îºóһ룬Á½Î»»òÈýλ
SQL> Select to_char(sysdate,'Y') from dual;
TO_CHAR(SYSDATE,'Y')
--------------------
7
SQL> Select to_char(sysdate,'YY') from dual;
TO_CHAR(SYSDATE,'YY')
---------------------
07 ......
ʹÓÃ
set
pagesize 1000
set
linesize 132
col
TS_NAME form a24
col
PIECES form 9999
col
PCT_FREE form 999.9
col
PCT_USED form 999.9
select
*
from (select Q2.OTHER_TNAME TS_NAME,
PIECES,
& ......
Èí¼þ: VMware Workstation 6.0.2 build-59824
10201_database_linux32.zip
rhel.5.0.server.centoschina.com.dvd.iso
Îĵµ:ORACLE10G¹Ù·½°²×°Îĵµ B19306_01_Oracle10gR2.chm
²Î¿¼:Öܾ¼ÀÏʦµÄORACLE10G OCPÊÓƵ(½²µÄÕæµÄ ......