oracleͳ¼ÆÐÅÏ¢ÊÕ¼¯
http://www.51testing.com/?uid-16403-action-viewspace-itemid-101604
ͳ¼ÆÐÅÏ¢°üÀ¨ÏÂÃ漸Àࣺ
±íͳ¼Æ£º°üÀ¨¼Ç¼Êý¡¢blockÊýºÍ¼Ç¼ƽ¾ù³¤¶È¡£
ÁÐͳ¼Æ£ºÁÐÖв»Í¬ÖµµÄÊýÁ¿£¨NVD£©¡¢¿ÕÖµµÄÊýÁ¿ºÍÊý¾Ý·Ö²¼£¨HISTOGRAM£©¡£
Ë÷Òýͳ¼Æ£ºË÷ÒýÒ¶¿éµÄÊýÁ¿¡¢Ë÷ÒýµÄ²ãÊýºÍ¾Û¼¯Òò×Ó£¨CLUSTERING FACTOR£©¡£
ϵͳͳ¼Æ£ºI/OÐÔÄܺÍÀûÓÃÂʺÍCPUÐÔÄܺÍÀûÓÃÂÊ¡£
Éú³Éͳ¼ÆÐÅÏ¢£º
ͳ¼ÆÐÅÏ¢Éú³É¼¼Êõ°üÀ¨ÈýÖÖ£º
»ùÓÚÊý¾Ý²ÉÑùµÄ¹À¼Æ·½Ê½£»
¾«È·¼ÆË㷽ʽ£»
Óû§×Ô¶¨ÒåµÄͳ¼ÆÐÅÏ¢ÊÕ¼¯·½Ê½£»
ÆäÖвÉÓùÀË㷽ʽ¿ÉÒÔÖ¸¶¨×ܼǼÊýµÄ¹ÀËã°Ù·Ö±È»òÕß×Ü¿éÊýµÄ¹ÀËã°Ù·Ö±È¡£
·ÖÇø±íµÄͳ¼ÆÐÅÏ¢·ÖΪ¼¸¼¶£º·ÖÇø±íµÄÕûÌåÐÅÏ¢¡¢·ÖÇøµÄͳ¼ÆÐÅÏ¢ºÍ×Ó·ÖÇøµÄͳ¼ÆÐÅÏ¢¡£
×î³£ÓõÄÊÕ¼¯Í³¼ÆÐÅÏ¢µÄ·½Ê½°üÀ¨£ºDBMS_STATS°üºÍANALYZEÓï¾ä£¬OracleÍƼöʹÓÃDBMS_STATS°üÀ´ÊÕ¼¯Í³¼ÆÐÅÏ¢¡£
DBMS_STATS°üÖÐÓÃÓÚÊÕ¼¯Í³¼ÆÐÅÏ¢µÄ¹ý³Ì°üÀ¨£º
dbms_stats.gather_table_stats ÊÕ¼¯±í¡¢ÁкÍË÷ÒýµÄͳ¼ÆÐÅÏ¢£»
dbms_stats.gather_schema_stats ÊÕ¼¯SCHEMAÏÂËùÓжÔÏóµÄͳ¼ÆÐÅÏ¢£»
dbms_stats.gather_index_stats ÊÕ¼¯Ë÷ÒýµÄͳ¼ÆÐÅÏ¢£»
dbms_stats.gather_system_stats ÊÕ¼¯ÏµÍ³Í³¼ÆÐÅÏ¢¡£
dbms_stats.delete_table_stats ɾ³ý±íµÄͳ¼ÆÐÅÏ¢
dbms_stats.export_table_stats Êä³ö±íµÄͳ¼ÆÐÅÏ¢
dbms_stats.create_state_table
dbms_stats.set_table_stats ÉèÖà ±íµÄͳ¼Æ
dbms_stats.auto_sample_size
dbms_stats.gather_database_stats£ºÊÕ¼¯Êý¾Ý¿âÖÐËùÓжÔÏóµÄͳ¼ÆÐÅÏ¢£»
ÔÚCREATE INDEXºÍALTER INDEX REBUILDʱ¿ÉÒÔÖ¸¶¨COMPUTE STATISTICSÓï¾ä£¬¶ÔÓÚ·Ç·ÖÇø±íÖؽ¨Ë÷Òýʱ»áÊÕ¼¯±í¡¢ÁкÍË÷ÒýµÄͳ¼ÆÐÅÏ¢¡£¶ÔÓÚ·ÖÇø±í£¬Ö»ÊÕ¼¯Ë÷ÒýÐÅÏ¢£¬²»»áÊÕ¼¯±íºÍÁÐÐÅÏ¢¡£
¿ÉÒÔÔÚ½«METHOD_OPT²ÎÊýÉèÖÃΪ“FOR ALL HIDDEN COLUMNS SIZE N”À´ÊÕ¼¯º¯ÊýË÷ÒýµÄË÷Òý±í´ïʽÐÅÏ¢¡£
Oracle¸ù¾ÝÏÂÁÐÌõ¼þÀ´¾ö¶¨Ê¹ÓÃÄÄЩË÷Òý£º
Ë÷ÒýÖеļǼÊý£»
Ë÷ÒýÖв»Í¬¼üÖµµÄÊýÁ¿£»
Ë÷ÒýµÄ²ãÊý£»
Ë÷ÒýÖеÄÒ¶¿éÊý£»
¾Û¼¯Òò×Ó£»
ÿ¸ö¼üֵƽ¾ùÒ¶¿éÊý£»
Èç¹ûÁ½¸öË÷ÒýµÄÑ¡ÔñÐÔ¡¢²éѯ´ú¼ÛºÍ¼¯Êƶ¼Ïàͬ£¬ÄÇôÓÅ»¯Æ÷»á¸ù¾ÝË÷ÒýÃû³ÆµÄ×Öĸ˳ÐòÑ¡
Ïà¹ØÎĵµ£º
1.OSÈÏÖ¤
Oracle°²×°Ö®ºóĬÈÏÇé¿öÏÂÊÇÆôÓÃÁËOSÈÏÖ¤µÄ£¬ÕâÀïÌáµ½µÄosÈÏÖ¤ÊÇÖ¸·þÎñÆ÷¶ËosÈÏÖ¤¡£OSÈÏÖ¤µÄÒâ˼°ÑµÇ¼Êý¾Ý¿âµÄÓû§ºÍ¿ÚÁîУÑé·ÅÔÚÁ˲Ù×÷ϵͳһ¼¶¡£Èç¹ûÒÔ°²×°OracleʱµÄÓû§µÇ¼OS£¬ÄÇô´ËʱÔڵǼOracleÊý¾Ý¿âʱ²»ÐèÒªÈκÎÑéÖ¤£¬È磺
SQL> connect /as sysdba
ÒÑÁ¬½Ó¡£
SQL> connect sys/aaa@te ......
ת×Ô£ºhttp://www.oracle.com/technology/obe/obe9ir2/obe-cnt/plsql/plsql.htm
¶¼Ëµ¶ÁÊé²»ÇóÉõ½âº¦ËÀÈË£¬Ò»µãÒ²²»´í£¬×î½üÎÒ´ÓÍøÉÏÌÔµ½¹ØÓÚORACLEÈçºÎ´ÓÊý¾Ý¿âĿ¼Ï¶ÁÎļþ£¬ÓÚÊǾÍÓÃÓÚÉú²úÁË£¬½á¹ûÉÏÁËÉú²ú£¬³ÌÐòËÀ»î¾ÍÊÇÅܲ»³öÀ´£¬ÔÒòÊÇÎÒÃǵķþÎñÆ÷×öÁËREC£¬Èç¹ûÔÚÁ½Ì¨»úÆ÷ÉÏÕÒÒ»¸öĿ¼ÄØ£¬ÒÔÇ°ÄØÔÚ×Ô¼ºµÄ³ÌÐòÀï°Ñ·¾ ......
ÏÞÖÆ¿ØÖÆÎļþµÄ´óС
a.)²éѯ¿É¸´Óò¿·ÖµÄ±£´æÌìÊý(²»ÄÜÖ±½Ó¿ØÖÆ´óС,±£´æÌìÊýÔ½´óÊý¾ÝÔ½¶à)
SELECT name,value from v$parameter WHERE name = 'control_file_record_keep_time';
b.)ÉèÖÿɸ´Óò¿·Ö±£´æʱ¼ä
ALTER SYSTEM SET CONTROL_FILE_RECORD_KEEP_TIME = 14;
......
http://tianzt.blog.51cto.com/459544/171759
´ËÎÄ´ÓÒÔϼ¸¸ö·½ÃæÀ´ÕûÀí¹ØÓÚ·ÖÇø±íµÄ¸ÅÄî¼°²Ù×÷:
1.±í¿Õ¼ä¼°·ÖÇø±íµÄ¸ÅÄî
2.±í·ÖÇøµÄ¾ßÌå×÷ÓÃ
3.±í·ÖÇøµÄÓÅȱµã
&nbs ......