ORACLEÎﻯÊÓͼ ÑÐò½¥½øMView£¨Áù£© MView¹ÜÀí
MViewÖØÒªÊÓͼÔÚÔ´Êý¾Ý¿â¶ËµÄÏà¹ØÊÓͼDBA_BASE_TABLE_MVIEWSDBA_REGISTERED_MVIEWSDBA_MVIEW_LOGSÔÚMViewÊý¾Ý¿â¶ËµÄÏà¹ØÊÓͼDBA_MVIEWSDBA_MVIEW_REFRESH_TIMESDBA_REFRESHºÍDBA_REFRESH_CHILDRENMViewÏà¹Ø°üһЩMViewά»¤µÄÏà¹ØÎÊÌâSNAPSHOT vs. Materialized ViewÇåÀíÎÞЧµÄMView Log²éѯMView LogµÄ´óС¼ì²éMVµÄˢмæÈÝÐÔ²éѯMViewË¢ÐÂÑÓʱ²Î¿¼Îĵµ
MViewÖØÒªÊÓͼ
OracleÎĵµÖÐMViewÏà¹ØÊÓͼµÄÁ´½ÓMaterialized View and Refresh Group Views¡£
ÔÚÔ´Êý¾Ý¿â¶ËµÄÏà¹ØÊÓͼ
DBA_BASE_TABLE_MVIEWS
´ËÊÓͼÓëϵͳÊÓͼSYS.SLOG$Ïà¶ÔÓ¦¡£
ÊÓͼDBA_BASE_TABLE_MVIEWS¼Ç¼ÁËʹÓÃMView Log·ÃÎÊ»ù±íµÄÏà¹ØˢеÄÐÅÏ¢¡£»»¾ä»°Ëµ¾ÍÊǼǼÁËʹÓÃÁËMView Log²¢ÇÒ×ö¹ý¿ìËÙˢеÄMViewµÄÐÅÏ¢£¬±ØÐëͬʱÂú×ãÓÐMView LogÒÔ¼°×ö¹ý¿ìËÙË¢ÐÂÕâÁ½¸öÌõ¼þ£¬È±Ò»²»¿É¡£
ÁÐÃûÃèÊö
OWNER
»ù±íµÄOWNER
MASTER
»ù±íµÄÃû³Æ
MVIEW_LAST_REFRESH_TIME
»ùÓÚÕâ¸ö»ù±íµÄMView×îºóµÄ¿ìËÙˢеÄʱ¼ä
MVIEW_ID
»ùÓÚÕâ¸ö»ù±íµÄMViewÔÚÊý¾Ý¿âÖеÄID£¬Õâ¸ö¿ÉÒÔºÍDBA_REGISTERED_MVIEWS¹ØÁªÕÒ³öÏàÓ¦µÄMViewµÄÃû³Æ
±¸×¢£ºSYS.SLOG$µÄ×÷ÓÃSYS.SLOG$¼Ç¼ÁË×¢²áÔÚÔ´Êý¾Ý¿â¶ËµÄÄܽøÐпìËÙˢеÄMViewµÄÐÅÏ¢¡£Õâ¸öÐÅÏ¢ÔÚ½øÐпìËÙˢеÄʱºò»á±¸Óõ½£¬Í¬Ê±Ò²»áÓÃÀ´Î¬»¤»ù±íµÄMView LogÐÅÏ¢¡£
DBA_REGISTERED_MVIEWS
´ËÊÓͼÓëϵͳÊÓͼSYS.REG_SNAP$Ïà¶ÔÓ¦¡£
ÊÓͼDBA_REGISTERED_MVIEWS¼Ç¼ÁËËùÓÐÔÚÖ÷Õ¾µãÉÏÃæ×¢²áµÄMViewµÄÏà¹ØµÄÐÅÏ¢£¬ÕâÀï±£´æµÄ¶«Î÷Ö»ÊÇÆðÌṩÐÅÏ¢ÐÔµÄ×÷Óᣵ±MViewÔÚ´´½¨µÄʱºòOracle»á×Ô¶¯µÄ½«MViewµÄÐÅϢдÈëµ½´ËÊÓͼÖУ¬µ«ÊÇÒ²²»Åųý»áÓÐʧ°ÜµÄÇé¿ö£¬ÒªÊÇʧ°ÜÁ˵Ļ°ÐèÒªÊÖ¶¯µÄʹÓÃDBMS_MVIEW°üÖеÄREGISTER_MVIEW½øÐÐ×¢²á¡£
ÏêϸµÄÁÐÃèÊö¾Í²»ÁÐÁË£¬¾ßÌåµÄ²Î¿´Îĵµ¡£
±¸×¢£ºSYS.REG_SNAP$µÄ×÷ÓÃSYS.REG_SNAP$¼Ç¼ÁË×¢²áÔÚÔ´Êý¾Ý¿â¶ËµÄMViewµÄÐÅÏ¢£¬Õâ¸ö±íÖ»ÊÇΪÁËÌṩÐÅÏ¢¶øÓá£
DBA_MVIEW_LOGS
´ËÊÓͼÓëϵͳÊÓͼSYS.mlog$Ïà¶ÔÓ¦¡£
´ËÊÓͼ¼Ç¼ÁËÔ´Êý¾Ý¿âÖеÄËùÓеÄMView LogµÄÏà¹ØÐÅÏ¢¡£
ÏêϸµÄÁÐÃèÊö¾Í²»ÁÐÁË£¬¾ßÌåµÄ²Î¿´Îĵµ¡£
ÔÚMViewÊý¾Ý¿â¶ËµÄÏà¹ØÊÓͼ
DBA_MVIEWS
´ËÊÓͼÓëϵͳÊÓͼSYS.SNAP$Ïà¶ÔÓ¦¡£
´ËÊÓͼÎÒÃÇÔÚ֮ǰÒѾ½Ó´¥Á˺ܶàÁË£¬ÊÓͼÀïÃæ±£´æÁËÊý¾Ý¿âÖÐËùÓеÄMViewµÄÐÅÏ¢¡£ÎÒÃǽøÐеĴ󲿷ÖÎﻯÊÓͼµÄ²éѯ¹¤×÷¶¼Òª»ùÓÚÕâ¸öÊÓͼÀ´½øÐС£
ÏêϸµÄÁÐÃèÊö¼ûÎĵµ¡£
DBA_MVIEW_REFRESH_TIMES
´ËÊÓͼÓëϵͳÊÓͼSYS.SNAP_REFTIME$Ïà¶ÔÓ¦¡£
Ïà¹ØÎĵµ£º
--È¡µÃµ±Ìì0ʱ0·Ö0Ãë
select TRUNC(SYSDATE) from dual;
--È¡µÃµ±Ìì23ʱ59·Ö59Ãë(ÔÚµ±Ìì0ʱ0·Ö0ÃëµÄ»ù´¡ÉϼÓ1ÌìºóÔÙ¼õ1Ãë)
SELECT TRUNC(SYSDATE)+1-1/86400 from dual;
--È¡µÃµ±Ç°ÈÕÆÚÊÇÒ»¸öÐÇÆÚÖеĵڼ¸Ìì,×¢Ò⣺ÐÇÆÚÈÕÊǵÚÒ»Ìì
select to_char(sysdate,'D'),to_char(sysdate,'DAY') from dual;
--ÔÚoracleÖÐÈçºÎµÃ ......
SunÖÕÓÚµ¹ÏÂÁË£¬Ò»¸ö²»µ«´´Ôì¼¼ÊõÉñ»°£¬¸øÊÀ½çIT¼¼Êõ´øÀ´¸ïÃüÐÔÓ°ÏìµÄ¹«Ë¾µ¹ÏÂÁË£¬ÎÒ»³ÄîËü¡£
ÎÒ¸öÈËÈÏΪORACLEºÍSUNµÄºÏ²¢£¬ÊÇÁ½¼Ò
¹«Ë¾µÄÐÒÊ£¬ORACLE½øÒ»²½ÍêÉÆÁ˲úÆ·Ïߣ¬²¢ÇÒ·ûºÏÁËÄ¿Ç°SaaSºÍÔƼÆËãµÄÇ÷ÊÆ£¬³ÉΪһ¸öÔÚ²úÆ·ÏߺͷþÎñÉÏ¿ÉÒÔºÍIBM½øÐоºÕùµÄ¹«Ë¾£¬¶øSUNµÄ
¼¼Êõ¿ÉÄܻᱻORACLE¹«Ë¾µÄÓªÏúÄÜÁ¦·½·¨£¬Ê¹SUNµ ......
1.»ù´¡ÈÏʶ
DBMS_RANDOM°üµÄÏêϸÐÅÏ¢£º
select text from all_source
where name = 'DBMS_RANDOM'
......
¡ö ¿ª·¢Ç°ÒªÇóÅäÖÃ
¡ö Select XML¸ñʽÊý¾Ý
¡ö Insert XML¸ñʽÊý¾Ý
¡ö Updata XML¸ñʽÊý¾Ý
¡ö Delete XML¸ñʽÊý¾Ý
¿ª·¢Ç°ÒªÇóÅäÖÃ
±ØÐë°²×°Oracle¿Í»§¶Ë
°ÑClasspathÖ¸Ïò
classes111.zip ......
¡¡
¡¡
DML Data manipulation language
SELECT
SELECT [DISTINCT] *|ÁÐxx [AS] "±ðÃûxx"[,ÁÐxx "±ðÃûxx"...]
×Ö·û´®Á¬½Ó·û ||, ×Ö·û»òÈÕÆÚÀàÐ͵Ä×Ö·û´®Óõ¥ÒýºÅ’’, ÁбðÃûÓÃË«ÒýºÅ“”¡£Èç¹û±ðÃûÖÐÓпոñ¡¢ÌØÊâ×Ö·û»òÕßÒªÇóÇø·Ö´óСд£¬±ØÐëÓÃË«ÒýºÅ¡£Ä¬ÈÏÇé¿öÏÂÁбêÌâΪ´óд£¬ ......