תÔØoracle rollupºÍcubeº¯ÊýʹÓÃÐĵÃ
ת×Ô£ºhttp://blog.csdn.net/wangdongzjk/archive/2005/11/18/532424.aspx
ʹØCUBE ROLLUP GROUPING SETS£¨1£©
ÔÎÄÒý×Ô£º
¾ÛºÏÊÇÊý¾Ý²Ö¿âµÄ»ù´¡¡£ÎªÁËÌá¸ß¾ÛºÏµÄÐÔÄÜ¡£OracleÌṩÁËGroup By Ìõ¿îµÄÀ©Õ¹¡£
1£® CUBE, ROLLUPÀ©Õ¹
2£® 3¸ögroupingº¯Êý
3£® Grouping setÀ©Õ¹
CUBE ROLLUP GROUPING SETS¶ÔSQLµÄÀ©Õ¹Ê¹µÃ²éѯºÍ±¨¸æ¶¼±äµÃ¼òµ¥ºÍѸËÙ¡£Rollup¼ÆËãÖîÈçsum count max min avgµÄº¯Êý£¬Ôö¼ÓÁ˾ۺϵļ¶±ð.CUBEÊÇÒ»¸öÀàËÆROLLUPµÄÀ©Õ¹£¬Ê¹µÃ¿ÉÒÔÓÃÒ»¸öÓï¾ä¼ÆËãËùÓпÉÄܵľۺϡ£CUBE¿ÉÒÔͨ¹ýµ¥ÌõÉú³ÉCross-tabulation£¨½»²æ±¨±í£©±¨¸æµÄÐÅÏ¢¡£CUBE£¬ROLLUP£¬GROUPING SETSÀ©Õ¹ÁîÄã¿ÉÒÔ¾«È·µÄ¶ÔÄã¸ÐÐËȤµÄgroup by Ìõ¿î½øÐÐgrouping¡£²»ÔËÐÐcube²Ù×÷Ò²¿ÉÒÔ¸ßЧµÄ´Ó¶à¸öά¶È½øÐзÖÎö¡£¼ÆËãÒ»¸öfull cube½«»á´øÀ´ºÜ¸ßµÄ¸ºÔØ£¬ËùÒÔ½«cubeÌ滻Ϊgrouping sets¿ÉÒÔÃ÷ÏÔµØÌá¸ßÐÔÄÜ¡£CUBE ROLLUP GROUPING SETS¿ÉÒÔÉú³Éµ¥¸ö½á¹û¼¯£¬µÈЧÓÚUNION ALL¡£ÎªÁËÌá¸ßÐÔÄÜ£¬CUBE, ROLLUP, and GROUPING SETS¿ÉÒÔ²¢ÐнøÐУº¶à½ø³ÌͬʱÔËËãËùÓеÄÓï¾ä¡£ÕâÖÖ¹¦ÄÜʹµÃ¾ÛºÏ¼ÆËã¸ü¼Ó¸ßЧ£¬Òò´ËÌá¸ßÁËÊý¾Ý¿âÐÔÄܺͿɲâÐÔ¡£
Analyzing Across Multiple Dimensions
¶àά·ÖÎö
ÔÚDSSϵͳÖÐÒ»¸öºÜÖØÒªµÄ¸ÅÄîÊǶàά·ÖÎö£º
´Ó¶à¸ö½Ç¶È¶ÔÆóÒµµÄ×´¿ö½øÐв鿱¡£Demension£¬ÖÚ¶àµÄάһ°ãÊÇʱ¼ä£¬¿Õ¼ä£¬²úÆ·£¬²¿ÃÅ£¬ÇþµÀ£¬ÆóÒµµÄά¶È¶àÖÖ¶àÑù¡£Ê¼þºÍʵÌå¹ØÁªÌض¨µÄά¶È¾ÍÊÇËùνµÄfacts.ÕâЩËùνµÄfacts¿ÉÒÔÊÇÏúÊÛ£¬ÏÖ½ð£¬ÀûÈ󣬿ͻ§ÕË»§£¬»òÊÇÆäËûһЩֵµÃ¼Ç¼µÄ¶«¶«¡£
ÏÂÃæÊÇһЩ¶àάÐèÇóµÄÀý×Ó
1£® չʾ1999ºÍ2000Ä꣬ËùÓвúÆ·µÄ×ÜÏúÁ¿£¬¾ÛºÏ¼¶±ðΪµØÓòά¶È£¬´ÓÖݵ½¹ú¼Òµ½µØÇø¡£
2£® ´´½¨½»²æ±¨±í·ÖÎö1999ºÍ2000ÄêÄÏÃÀÖÞ·¶Î§µÄ·ÑÓ㬰üÀ¨ËùÓеÄС¼Ç
ËùÓеÄÐèÇ󶼰üº¬Á˶àά¡£ºÜ¶à¶àάµÄÎÊÌâÐèÒªÊý¾ÝµÄ¾ÛºÏ£¬Êý¾Ý¼¯µÄ±È½Ï£¬Í¨³£¿çԽʱ¼ä£¬µØÓò¡£
Optimized Performance
²»½ö½öÊǶàάµÄÎÊÌ⣬»¹ÓÐËùÓÐÀàÐ͵Ĵ¦Àí¿ÉÒÔ´ÓÔöÇ¿¾ÛºÏ¹¦ÄÜÖеõ½ºÃ´¦¡£ÊÂÎñµÄ´¦Àí£¬½ðÈÚÖÆÔìϵͳ-ËùÓеÄÕâЩ¶¼²úÉú´óÁ¿µÄÉú²ú±¨¸æÐèÒª´óÁ¿µÄϵͳ×ÊÔ´¡£´´½¨ÕâЩ±¨¸æ¼õÉÙϵͳ¸ºÔØ£¬ÌáÉýÁËϵÍ
Ïà¹ØÎĵµ£º
Oracle±í¿Õ¼äµÄ¹ÜÀí
1.´´½¨±í¿Õ¼ä
//´´½¨ÁÙʱ±í¿Õ¼ä
create temporary tablespace test_temp
tempfile 'E:\oracle\product\10.2.0\oradata\testserver\test_temp01.dbf'
size 32m
autoextend on
next 32m maxsize 2048m
extent management local;
&nbs ......
Ò»£®Ïà¹ØµÄ¸ÅÄî
RowidµÄ¸ÅÄrowidÊÇÒ»¸öαÁУ¬¼ÈÈ»ÊÇαÁУ¬ÄÇôÕâ¸öÁоͲ»ÊÇÓû§¶¨Ò壬¶øÊÇϵͳ×Ô¼º¸ø¼ÓÉϵġ£¶Ôÿ¸ö±í¶¼ÓÐÒ»¸örowidµÄαÁУ¬µ«ÊÇ
±íÖв¢²»ÎïÀí´æ´¢ROWIDÁеÄÖµ¡£²»¹ýÄã¿ÉÒÔÏñʹÓÃÆäËüÁÐÄÇÑùʹÓÃËü£¬µ«ÊDz»ÄÜɾ³ý¸ÄÁУ¬Ò²²»ÄܶԸÃÁеÄÖµ½øÐÐÐ޸ġ¢²åÈë¡£Ò»µ©Ò»ÐÐÊý¾Ý²åÈëÊý¾Ý¿â£¬Ôò
rowidÔÚ¸ÃÐ ......
µÇ½ORACLEʱ³öÏÖ£ºORA-12637 °ü½ÓÊÜʧ°Ü ´íÎó
½â¾ö·½·¨£ºÔÚ\oracle\product\10.2.0\client_1\NETWORK\ADMIN ÖÐÕÒµ½sqlnet.oraÎļþ£¬
°ÑÐÞ¸Ä SQLNET.AUTHENTICATION_SERVICES= (NONE)¾Í¿ÉÒÔÁË¡£ ......
alter system set nls_length_semantics='BYTE' scope=both
sql>show parameter length
NAME TYPE
------------------------------------ --------------------- ......
About parent vs child latches. There is no fundamental low level difference between parent and child latches, they are all small regions of memory modified with atomic test-and-set style opcodes.
You see parent (and solitary) latches from x$ksll ......