Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

OracleµÄ¾Û´Ø±í

Ë÷Òý¾Û´Ø±í
create cluster emp_dept_cluster
(deptno number(2)) size 1024;
size 1024 ±íʾÿ¸ö¾Û´Ø¼üÖµ¹ØÁª´óÔ¼1024×Ö½ÚµÄÊý¾Ý,
oracle»áÔÚÓÃÕâ¸öÊý¾Ý¿â¿éÉÏͨ¹ýsize¼ÆËã×î¶à¿ÉÒԷŶàÉÙ¸ö´Ø
Èç¹û¿éÊÇ8KB,ÄÇôÕâ¸ö¿éÉÏ×î¶à·Å7¸ö¾Û´Ø¼ü
Ïò¾Û´ØÖзÅÊý¾Ý֮ǰ,ÐèÒªÏȶԾ۴ؽ¨Á¢Ë÷Òý.
create index emp_dept_cluster_idx on cluster emp_dept_cluster;
¼ÓÔصķ½Ê½Ó¦²ÊÓÃÒ»Ò»¶ÔÓ¦µÄ¹Øϵ.¼ÓÔØÍêÖ÷±íÖ®ºóÔÙ¼ÓÔØ´Ó±í
ʲôÇé¿öϲ»ÄÜÓÃË÷Òý¾Û´Ø±í
1)Èç¹ûÔ¤Áϵ½¾Û´ØÖеıí»á´óÁ¿ÐÞ¸Ä,Ë÷Òý¾Û´Ø±í»á¶ÔDMLµÄÐÔÄܲúÉú¸ºÃæÓ°Ïì.
2)·Ç³£²»Êʺ϶Ե¥±íµÄÈ«±íɨÃè,ÒòΪֻÄÜÒýÆð¶ÔÆäËü±íµÄÈ«±íɨÃè
3)Ƶ·±¶Ô±í½øÐÐTRUNCATEºÍ¼ÓÔØ,ÒòΪ¾Û´ØÖеıíÊDz»ÄÜTRUNCATEµÄ
SQL> truncate table dept;
truncate table dept
               *
ERROR at line 1:
ORA-03292: Table to be truncated is part of a cluster
Èç¹ûÊý¾ÝÖ÷ÒªÓÃÀ´¶Á,²»ÔõôÐÞ¸Ä,²¢ÇÒÂß¼­ÉÏÓë¾Û´ØÁ¬½ÓÏëÊʺÏ,×îºÃʹÓÃË÷Òý¾Û´Ø±í
oracleÊý¾Ý×Öµä¾ÍÊÇÕâÑù×öµÄ
SQL> set autotrace traceonly statistics
SQL> select a.deptno,b.ename from dept_02 a,emp_02 b where a.deptno=b.deptno and
a.deptno='30';
6 rows selected.
Execution Plan
----------------------------------------------------------
   0      SELECT STATEMENT Optimizer=CHOOSE
   1    0   MERGE JOIN
   2    1     INDEX (UNIQUE SCAN) OF 'dddd' (UNIQUE)
   3    1     FILTER
   4    3       TABLE ACCESS (FULL) OF 'EMP_02'
Statistics
----------------------------------------------------------
          0 recursive calls
          0 db block gets
          5 consistent gets
          0 physical reads
          0 red


Ïà¹ØÎĵµ£º

C# µ÷ÓÃOracle ´æ´¢¹ý³Ì·µ»ØÊý¾Ý¼¯ ʵÀý

1. ÔÚoracle Ï´´½¨±í
     t_user(
        ID varchar(20),
        Name varchar(20)
       )
 2.  Ìí¼ÓÊý¾Ý 
         &nb ......

Oracle·¢²¼SunµÄ¸÷Ïî²úÆ·µÄδÀ´µÄFAQÁбí


Ô­·¢±íÓÚhttp://saharabear.javaeye.com
ͬʱ·¢±íÔÚÕâÀï.
²»ÐèÒªÏàÐÅÉÌÒµÉϵÄÈκγÐŵ,²»¹ýÈκεĹٷ½FAQ¶¼»áÓвο¼¼ÛÖµ,ÕâÀï
ÊÇOracle·¢²¼µÄÕë¶ÔSunµÄ¸÷Ïî²úÆ·µÄһЩ˵Ã÷µÄFAQ,»ù±¾ÉÏÃèÊöÁ˶ÔGlassfish¼ÌÐøÖ§³Ö,¶ÔNetbeans¼ÌÐø¿ª·¢µÄ̬¶È,²»¹ý,kenai.com,ΰ´óµÄ"ÎÒÃDz»½ö½öÊÇ´úÂëÍйÜ"µÄÉç½»ÐÔ¿ª·¢Õ¾µã,»ù± ......

Oracle»ù´¡ÊÔÌ⣨ÃæÊÔ»ù±¾£©

1¡¢´æ´¢¹ý³ÌºÍº¯ÊýµÄÇø±ð¡£
£¨1£©¡¢´æ´¢¹ý³ÌÊÇ×÷ΪPL/SQLÓï¾äÖ´ÐУ¬¶øº¯ÊýÊÇ×÷Ϊ±í´ïʽµÄÒ»²¿·Öµ÷Óã»
 £¨2£©¡¢´æ´¢¹ý³ÌÔÚ¹æ¸ñ˵Ã÷Öв»°üº¬returnÓï¾ä£¬¶øÔÚº¯ÊýµÄ¹æ¸ñ˵Ã÷Õâ°üº¬return×Ӿ䣻
  (3)¡¢´æ´¢¹ý³Ì²»·µ»ØÖµ£¬¶øº¯Êý±ØÐë·µ»ØÖµ£»
 £¨4£©¡¢ÔÚ´æ´¢¹ý³ÌÖпÉÒÔ°üº¬returnÓï¾ä£¬µ«²»·µ»ØÈκÎÖ ......

OracleÅÅÐòÒÔ¼°ÐòºÅµÄÊä³ö

   ÔÚÒ»°ãSelectÓï¾äÖÐÎÒÃÇͨ¹ýOrder by ...Asc/DescÀ´½øÐÐÅÅÐò¡£µ«ÊÇÕâÖÖÅÅÐò·½Ê½ÔÚÊä³öʱ£¬²»°üº¬ÅÅÐòºóµÄÐòºÅÐÅÏ¢¡£
   ÏÖÔÚ½éÉÜÒ»ÏÂOracleÖпÉÒÔÓÃÓÚÅÅÐòÊä³öµÄ·½·¨¡£
   1. RANK ( ) OVER ( [query_partition_clause] order_by_clause )
   RANK ( ) OVER ( [query_p ......

oracleÊÂÎñ´¦Àí

1.»ØÍËÊÂÎñ
×îºÃÉèÖÃÒ»¸ö±£´æµã£¬Àýsavepoint a,»òÕßÖ´ÐÐ exec dbms_transaction.savepoint('a')(Ö´ÐÐÇ°ÐèÒªÖ´ÐÐset serveroutput onÓï¾ä)£»È¡Ïû²¿·ÖÊÂÎñ¾Í¿ÉÒÔʹÓÃrollback to a,»òÕßÖ´ÐÐexec dbms_transaction.rollback_savepoint('a');È¡ÏûÈ«²¿ÊÂÎñ¿ÉÒÔÖ´ÐÐrollback,»òÕßexec dbms_transaction.rollback;
2.Ö»¶ÁÊÂÎñ
......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ