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

ROLLUPºÍCUBEÓï¾ä¡£ ORACLE·Ö×éͳ¼Æ

ROLLUPºÍCUBEÓï¾ä¡£
OracleµÄGROUP
BYÓï¾ä³ýÁË×î»ù±¾µÄÓï·¨Í⣬»¹Ö§³ÖROLLUPºÍCUBEÓï¾ä¡£Èç¹ûÊÇROLLUP(A, B, C)µÄ»°£¬Ê×ÏÈ»á¶Ô(A¡¢B¡¢C)½øÐÐGROUP
BY£¬È»ºó¶Ô(A¡¢B)½øÐÐGROUP BY£¬È»ºóÊÇ(A)½øÐÐGROUP BY£¬×îºó¶ÔÈ«±í½øÐÐGROUP BY²Ù×÷¡£Èç¹ûÊÇGROUP BY
CUBE(A, B, C)£¬ÔòÊ×ÏÈ»á¶Ô(A¡¢B¡¢C)½øÐÐGROUP
BY£¬È»ºóÒÀ´ÎÊÇ(A¡¢B)£¬(A¡¢C)£¬(A)£¬(B¡¢C)£¬(B)£¬(C)£¬×îºó¶ÔÈ«±í½øÐÐGROUP BY²Ù×÷¡£
grouping_id()¿ÉÒÔÃÀ»¯Ð§¹û£º
OracleµÄGROUP BYÓï¾ä³ýÁË×î»ù±¾µÄÓï·¨Í⣬»¹Ö§³ÖROLLUPºÍCUBEÓï¾ä¡£
³ý±¾ÎÄÄÚÈÝÍ⣬Ä㻹¿É²Î¿¼£º
·ÖÎöº¯Êý²Î¿¼Êֲ᣺
http://xsb.itpub.net/post/419/33028
·ÖÎöº¯ÊýʹÓÃÀý×Ó½éÉÜ£º
http://xsb.itpub.net/post/419/44634
SQL> create table t as select * from dba_indexes;
±íÒÑ´´½¨¡£
SQL> select index_type, status, count(*) from t group by index_type, status;
INDEX_TYPE STATUS COUNT(*)
--------------------------- -------- ----------
LOB VALID 51
NORMAL N/A 25
NORMAL VALID 479
CLUSTER VALID 11
ÏÂÃæÀ´¿´¿´ROLLUPºÍCUBEÓï¾äµÄÖ´Ðнá¹û¡£
SQL> select index_type, status, count(*) from t group by rollup(index_type, status);
INDEX_TYPE STATUS COUNT(*)
--------------------------- -------- ----------
LOB VALID 51
LOB 51
NORMAL N/A 25
NORMAL VALID 479
NORMAL 504
CLUSTER VALID 11
CLUSTER 11
566
ÒÑÑ¡Ôñ8ÐС£
SQL> select index_type, status, count(*) from t group by cube(index_type, status);
INDEX_TYPE STATUS COUNT(*)
--------------------------- -------- ----------
566
N/A 25
VALID 541
LOB 51
LOB VALID 51
NORMAL 504
NORMAL N/A 25
NORMAL VALID 479
CLUSTER 11
CLUSTER VALID 11
ÒÑÑ¡Ôñ10ÐС£
²éѯ½á¹û²»ÊǺÜһĿÁËÈ»£¬ÏÂÃæͨ¹ýOracleÌṩµÄº¯ÊýGROUPINGÀ´ÕûÀíһϲéѯ½á¹û¡£
SQL> select grouping(index_type) g_ind, grouping(status) g_st, index_type, status, count(*)
2 from t group by rollup(index_type, status) order by 1, 2;
G_IND G_ST INDEX_TYPE STATUS COUNT(*)
---------- ---------- --------------------------- -------- ----------
0 0 LOB VALID 51
0 0 NORMAL N/A 25
0 0 NORMAL VALID 479
0 0 CLUSTER VALID 11
0 1 LOB 51
0 1 NORMAL 504
0 1 CLUSTER 11
1 1 566
ÒÑÑ¡


Ïà¹ØÎĵµ£º

jdbcÁ¬½ÓOracle

      ËäȻѧϰJavaºÜ¾ÃÁË£¬×Ô¼ºÒ²Á¬½Ó¹ýһЩÊý¾Ý¿â£¬±ÈÈçmysqlÖ®ÀàµÄ£¬Èç½ñÄØ£¬Ò²Ñ§Ï°ÁËÒ»¶Îʱ¼äµÄOracle£¬È»¶øÄØ£¬½ñÌìÊÇÎÒµÚÒ»´ÎÁ¬½ÓOracle£¬ºÙºÙ£¬Ó¦¸Ã»¹²»ËãÌ«³Ù°É¡£
    ½ñÌìÄØ£¬Óе㱿׾£¬´ó¼ÒĪЦ£¡
    ÎÒÕâÊÇÒ»¸ö²éѯÀý×Ó
    Ê×ÏÈ£¬Ô ......

ORACLE°²×°²ÎÊý˵Ã÷¼°×¢ÒâÊÂÏ

Ô­ÎĵØÖ·£ºhttp://blog.csdn.net/fengyun14/archive/2007/03/25/1540433.aspx
¹ØÓÚLinux ÏÂkernel.shmmax µÄÉèÖÃÎÊÌâ
ÏÂÃæÊÇOracle ÎĵµÉϵĽâÊÍ£¬ http://download-west.oracle.com/doc...e.htm#sthref107
SHMMAX Available physical memory Defines the maximum allowable size of one shared memory segment.
The ......

OracleÖÐΪʲôwhere rownum > 3 ²éÕÒ²»µ½Êý¾Ý£¿

²éѯ±íempÖÐËùÓÐÊý¾Ý
select emp_id,rownum from emp
µÚÒ»²½£¬²éѯ½á¹û,rownum´ý¶¨
emp_id rownum
1         ?   1
2         ?   2
3         ?   3
4&n ......

Oracle±¸·Ý½Å±¾


Ä¿±ê£ºÎÒÏëʵÏÖÕâÑùµÄ¹¦ÄÜ£¬Ö»Òª»á¼òµ¥µÄlinuxÃüÁî¾ÍÄÜʵÏÖoracle expµÄ×Ô¶¯±¸·Ý
 
»·¾³£ºlinux as3+oracle9i
¾ßÌåµÄ²½Ö裺
 
1.ÓʼþÉèÖÃ
[root@sxapp1 mail]# cd /etc/mail
[root@sxapp1 mail]# mv submit.cf submit.cfbak
[root@sxapp1 spool]# chmod a+wrx mqueue/
[root@sxapp1 mail]# echo "sdsd ......

ÈçºÎ²é¿´ºÍÇå³ýoracleÎÞÓõÄÁ¬½Ó½ø³Ì


DBAÒª¶¨Ê±¶ÔÊý¾Ý¿âµÄÁ¬½ÓÇé¿ö½øÐмì²é£¬¿´ÓëÊý¾Ý¿â½¨Á¢µÄ»á»°ÊýÄ¿ÊDz»ÊÇÕý³££¬Èç¹û½¨Á¢Á˹ý¶àµÄÁ¬½Ó£¬»áÏûºÄÊý¾Ý¿âµÄ×ÊÔ´¡£Í¬Ê±£¬¶ÔһЩ“¹ÒËÀ”µÄÁ¬½Ó£¬¿ÉÄÜ»áÐèÒªDBAÊÖ¹¤½øÐÐÇåÀí¡£
ÒÔϵÄSQLÓï¾äÁгöµ±Ç°Êý¾Ý¿â½¨Á¢µÄ»á»°Çé¿ö:
select sid,serial#,username,program,machine,status
from v$session; ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ