ORACLEµ÷ÓÅÖ® ÄÚ´æ½á¹¹µ÷ÓÅ£¨Õª×ÔÎÄƽÊ飩
´ÓAIX ½Ç¶È£¬ÎÒÃÇ¿ÉÒÔÔÚÏÂÃæÈý¸ö½Ç¶ÈºâÁ¿ÄÚ´æʹÓõĺÏÀíÐÔ
1>¼õÉÙÒ³Ãæ½»»»²Ù×÷
µ±²Ù×÷ϵͳÐèÒª¸ü¶àÄÚ´æÒ³ÒÔÖ§³ÖÆäËûÓ¦ÓÃÔËÐÐʱ£¬²Ù×÷ϵͳ½«ÒÀ¾ÝijÖÖËã·¨£¨LRUËã·¨£©°Ñµ±Ç°×¤ÁôÔÚÄÚ´æÖеÄijЩ
Êý¾ÝÒ³"Page Out"£¬Ò²¾ÍÊÇ°ÑÄÚ´æÖеÄÊý¾ÝÒ³´ÓÄÚ´æ¶ÎתÒƵ½ÎïÀí´ÅÅÌ¡£ÏÔÈ»£¬ÕâÖÖÀàÐ͵IJÙ×÷»áÓ°ÏìÕû¸öϵͳµÄÔËÐÐÐÔÄÜ¡£
¶ÔÓÚÊý¾Ý¿âÕâÖÖÄÚ´æÃô¸ÐÀàÐ͵ÄÓ¦ÓÃϵͳÀ´Ëµ£¬ÕâµãÓÈΪÖØÒª¡£ÒòΪÊý¾Ý¿âÐèÒª°ÑÊý¾Ý·ÅÔÚÄÚ´æÖвÙ×÷£¬Õⲿ·ÖÄÚ´æÇøÓò
³ÆΪ“Êý¾Ý¸ßËÙ»º´æ”¡£
Òò´Ë£¬Ò»°ãÔÚϵͳÉè¼Æʱ£¬ÎÒÃÇÍùÍù½«Êý¾Ý¿â°²×°ÔÚһ̨·þÎñÆ÷ÉÏ£¬¶ÀÕ¼Õą̂·þÎñÆ÷µÄËùÓÐ×ÊÔ´£¬±ÜÃâÒ³½»»»µÄ²úÉú¡£
ÔÚÊý¾Ý¿âÅäÖÃʱ£¬Ò²±ÜÃâ¹ý¶ÈµØ½«ÄÚ´æ½á¹¹·ÖÅä¸øÊý¾Ý¿â£¬ÈËΪÔì³É²Ù×÷ϵͳ¿ÕÓàÄÚ´æµÄ½ôÕÅ¡£
2>SGAÓ¦ËÞÖ÷ÔÚÎïÀíÄÚ´æÖÐ
·ÖÅäSGAµÄÄ¿µÄ¾ÍÊÇΪÁË¿ìËٵؽ«Êý¾Ý´æ´¢ÔÚÄÚ´æÖУ¬ÒòΪÄÚ´æËÙÂʺÍÓ²ÅÌËÙÂÊÏà±È£¬²î±ðÖÁÉÙÔÚ4¸öÊýÁ¿¼¶ÒÔÉÏ¡£Èç¹û
SGA¶ÔÓ¦µÄÐéÄâÄÚ´æÒ³±»½»»»µ½»»Ò³¿Õ¼ä£¨´ÅÅÌ£©ÉÏ£¬ÄÇôSGAÒ²¾ÍûÓÐÒâÒåÁË¡£
ÎÒÃÇ¿ÉÒÔͨ¹ý show sgaÃüÁî²é¿´ÏµÍ³È«¾ÖÇøµ±Ç°µÄ·ÖÅäÇé¿ö:
SQL>show sga
Total System Global Area 285212672 bytes
Fixed Size 1218992 bytes
Variable Size 75499088 bytes
Database Buffers 205520896 bytes
Redo Buffers 2973696 bytes
´ÓÉÏÃæµÄ½á¹û¿ÉÒÔ¿´³ö£¬±¾Oracle ʵÀýSGA×ÜÌåΪ 285212672bytes(285MB),ÆäÖУ¬OracleÆô¶¯¹Ì¶¨ÄÚ´æ1218992bytes(1.2MB)
,¿É±äÄÚ´æ75499088bytes£¨75M),Êý¾Ý»º´æ205520896bytes(205M),ÈÕÖ¾»º´æ2973696bytes(2.9MB)
ΪÓû§Á¬½Ó×¼±¸³ä·ÖµÄÄÚ´æ×ÊÔ´
SGA½«Õ¼¾ÝÊý¾Ý¿â·þÎñÆ÷ÖÐÅÓ´óµÄÄÚ´æ×ÊÔ´¡£³ý´ËÖ®Í⣬ÎÒÃÇ»¹ÐèҪΪÔÚϵͳÉÏÔËÐеķþÎñÆ÷½ø³Ì£¨Server Process£¬Ò²¾ÍÊÇ
PGA£©ÒÔ¼°ÆäËûÈÎÎñÁôÏÂ×ã¹»µÄÄÚ´æ¡£
OracleÆô¶¯ºó£¬ÆäÄÚ´æ·ÖÅäÀíÂÛÉÏÒÀÀµÓÚÓ¦ÓõÄʹÓÃÌØÕ÷¡£Èç¹ûÓÉÓÚÄÚ´æµÄ·ÖÅäµ¼ÖÂÁËI/O²Ù×÷µÄ¼õÉÙ£¬²¢Òò´ËÓÅ»¯ÁËÓ¦ÓÃ
µÄI/OÐÔÄÜ£¬ÔòÎÒÃÇÈÏΪÄÚ´æʹÓÃÇ¡µ±¡£
||
Ïà¹ØÎĵµ£º
sql serverºÍoracleÐÐתÁеÄÒ»ÖÖµäÐÍ·½·¨
Ç°ÑÔ£ºÍøÉÏÓв»ÉÙÎÄÕÂÊǽ²ÐÐתÁеģ¬µ«ÊǴ󲿷ֶ¼ÊÇÖ±½ÓÌù´úÂ룬ºöÊÓÁËÖмä¹ý³Ì£¬±¾ÈË×Ô¼ºË¼¿¼ÁËÏÂΪʲôҪÕâÑùʵÏÖ£¬²¢ÇÒ×öÁËÈçϵıʼǣ¬¶ÔÓÐЩ¶®µÄÈËÀ´Ëµ¿ÉÄÜûÓмÛÖµ£¬Ï£Íû¶Ô»¹²»¶®µÄÈËÓÐÒ»µã½è¼øÒâÒå¡£
¶ÔÓÚÓÐЩҵÎñÀ´Ëµ£¬Êý¾ÝÔÚ±íÖеĴ洢ºÍÆä×îÖÕµÄGrid±íÏÖÇ¡ºÃÏ൱ÓÚ°ÑÔ ......
select sid,
p1,
p1raw,
p2,
p2raw,
p3,
p3raw,
&n ......
MySQL:
SELECT column from table
ORDER BY RAND()
LIMIT 1
PostgreSQL:
SELECT column from table
ORDER BY RANDOM()
LIMIT 1
Microsoft SQL Server:
SELECT TOP 1 column from table
ORDER BY NEWID()
IBM DB2
SELECT column, RAND() as IDX
from table
ORDER BY IDX FETCH FIRST 1 ROWS ONLY
Thanks Ti ......
ÆÀ¹ÀÊý¾Ý¸ßËÙ»º´æЧÂʵÄÖ¸±êÊÇÃüÖÐÂÊ¡£¸ÃÃüÖÐÂÊͨ¹ý²éѯV$SYSSTAT ºÍ$BUFFER_POOL_STATISTICSÊÓͼ¿ÉÒԵõ½¡£Õâ¸öÊÓͼ¿ÉÒÔ
²éѯÿ¸ö»º´æ³Ø¸÷×ÔµÄÃüÖÐÂÊ¡£»º´æ³ØµÄÃüÖÐÂʵļÆËã²ÉÓÃÏÂÃæµÄ¹«Ê½:
1-(physical_reads/(db_block_gets+consistent_gets))
ÏÂÃæµÄSQLÓï¾ä³£ÓÃÀ´²éѯµ±Ç°¸÷¸ö»º´æ³ØµÄÃüÖ ......