Oracle Waits event:DB File Scattered Read
The DB File Scattered Read wait event generally indicates waits related to full table scans or fast
full index scans. As full table scans are pulled into memory, they are scattered throughout the
buffer cache, since it is usually unlikely that they fall into contiguous buffers. A large number
indicates that there may be missing or suppressed indexes. This could also be preferred, since it
may be more efficient to perform a full table scan than an index scan. Check to ensure full table
scans are necessary when you see these waits. Try to cache small tables to avoid reading them
into memory over and over again. Locate the data on disk systems that have either more disk
caching or are buffered by the OS file system cache. DB_FILE_MULTIBLOCK_READ_COUNT
can make full scans faster (but it could also influence Oracle to do more of them). You can also
partition tables and indexes so that only a portion is scanned. Slow File I/O (slow disks) can
cause these waits. Correlated to each of the waits are the values for P1,P2,P3=file, block, blocks.
Ïà¹ØÎĵµ£º
Èý¡¢ PL/SQL³ÌÐòµ¥Ôª
1¡¢ÎÞÂÛÊǵ¥¶ÀµÄ¹ý³Ì/º¯Êý£¬»¹ÊǰüÖеĹý³Ì/º¯Êý£¬¶¼Í³³ÆÎª×Ó³ÌÐò¡£
2¡¢¹ý³Ì
1) Òì³£´¦Àí²¿·ÖÊÇ¿ÉÑ¡µÄ¡£
2) ¹ý³ÌÃûÓ¦¸ÃÓö¯´Ê£¬ÒòΪ¹ý³Ìͨ³£ÊÇÖ´ÐÐijÖÖ¶¯×÷¡£¹ý³Ì²¢²»Ò»¶¨¾ßÓвÎÊý¡£µ±´ ......
Ê×ÏȲ鿴Êý¾Ý¿âÏÖÓÐģʽ¿ÉʹÓÃÒÔÏÂÓï¾ä
select name,log_mode from v$database;
Ò²¿ÉÒÔÓÃÏÂÃæµÄÓï¾ä
archive log list£»(¸Ã·½·¨ÐèÒªas sysdba)
¶ÔÓڷǹ鵵ģʽµÄÊý¾Ý¿â¸ÃΪ¹éµµÄ£Ê½£¨Ö÷ÒªÒÔOracle 10gΪ²Î¿¼£©Ê¹ÓÃÒÔϲ½Ö裺
1. SQL> alter system set log_archive_dest_1='location=/oracle/oracle10g/log/archive ......
²Ù×÷²½ÖèÈçÏ£¬¹©²Î¿¼¡£
Êý¾Ý¿âתÐ͹¤×÷Éæ¼°µÄ¹¤×÷ÊÂÏî·ÖÎö£º±í£¬±íÊý¾Ý£¬Ë÷Òý£¬Íâ¼üÔ¼Êø£¬×Ö¶ÎĬÈÏÖµ¡£
´æ´¢¹ý³Ì¡¢º¯Êý¡¢´¥·¢Æ÷¡¢ÊÓͼµÈÓÉÓÚÓï·¨´æÔÚ²îÒ죬ֻÄÜ×ÔÐиÄд´¦Àí¡£
(Ò»)ÔÚMS SQL SERVER·þÎñÆ÷¶ËµÄ×¼±¸¹¤×÷¡£
1).´´½¨¹ØÓÚ±í¡¢ÊÓͼ¡¢Ö÷¼ü¡¢Ë÷Òý¡¢×Ö¶Î×ֵ䡢ĬÈÏÖµÔ¼ÊøµÄ¶ÔÏóÊÓͼ¡£ÒÔ·½±ãÏÂÒ»²½ ......
15. /*+USE_CONCAT*/
¶Ô²éѯÖеÄWHEREºóÃæµÄORÌõ¼þ½øÐÐת»»ÎªUNION ALLµÄ×éºÏ²éѯ. (ã¶®°¡,ÏÈ´æ×Å)
ÀýÈç:
select /*+use_concat */ * from emp where deptno=10 OR empno=7788;
Execution Plan
----------------------------------------------------------
0 S ......
ÐÞ¸Äoracle 10gµÄ×Ö·û¼¯
ÐÞ¸ÄÊý¾Ý¿â×Ö·û¼¯Îª£ºZHS16GBK
Ê×ÏÈÓÃscott&tiger&orclµÇ¼µ½sql/plus
²é¿´·þÎñÆ÷¶Ë×Ö·û¼¯
SQL > select * from
V$NLS_PARAMETERS;
Ð޸ģº
$sqlplus /nolog
SQL>conn / as sysdba
Èô
´ËʱÊý¾Ý¿â·þÎñÆ÷ÒÑÆô¶¯£¬ÔòÏÈÖ´ÐÐ SHUTDOWN IMMEDIATE Ãü
Áî¹Ø±ÕÊý¾Ý¿â·þÎñÆ÷£¬È»ºóÖ´ ......