ÉèΪÊ×Ò³ ¼ÓÈëÊÕ²Ø

TOP

Ò»µÀÌÔ±¦dbaÃæÊÔÌâÄ¿
2014-11-23 21:26:44 À´Ô´: ×÷Õß: ¡¾´ó ÖРС¡¿ ä¯ÀÀ:14´Î
Tags£ºÒ»µÀ dba ÃæÊÔ ÌâÄ¿

ÎÊÌâÊÇÕâÑùÃèÊöµÄ£ºÓÐÒ»¸öÓû§²»¶Ï·ÃÎʵij¬¹ý1000Íò¼Ç¼µÄ´ó±í,ÎÊÈçºÎ°ÑË÷Òý(a,b)¸ÄÎªÎ¨Ò»Ô¼Êø(a,b,c).²¢°ÑÐ޸ĵÄSQLÓï¾äд³öÀ´
·ÖÎö£¬ÒòΪ´ó±í³¬¹ýǧÍò£¬ÊôÓÚ´óÁ¿Êý¾Ý£¬¶øÇÒÒª¸Ä±äË÷Òý½á¹¹£¬ËùÒÔ±ØÐëÒªÏȽ¨Á¢Ë÷Òý£¬ÔÙɾ³ý¾ÉµÄË÷Òý
ITPUBÉϸø³öÕâÑùµÄ·ÖÎö£º
#Do all ops at proper op windows
1.online build new (unique or not ) index (with statistics collected if needed)
2.maybe you¡¯ll have to ensure that your sql can use the new index now so while the old index dropped everything goes well
3.add constraint using index enable novalidate
4.alter constaint validate
5.ensure your sql goes well
6.drop the old index
7.ensure your sql goes well
8.ensure your db goes well
9.done
¾ßÌåµÄÄѵãÔÚÓÚµÚÈý²½£¬Òâ˼ÊÇÏȲ»¼ì²é±íÀïÃæÒѾ­ÓеÄÊý¾Ý£¬Ö»¶Ôºó²åÈëµÄÊý¾ÝÆôÓÃÕâ¸öÔ¼Êø


¡¾´ó ÖРС¡¿¡¾´òÓ¡¡¿ ¡¾·±Ìå¡¿¡¾Í¶¸å¡¿¡¾Êղء¿ ¡¾ÍƼö¡¿¡¾¾Ù±¨¡¿¡¾ÆÀÂÛ¡¿ ¡¾¹Ø±Õ¡¿ ¡¾·µ»Ø¶¥²¿¡¿
·ÖÏíµ½: 
ÉÏһƪ£º(ÃæÊÔÌâ)Ôõô½«Êý¾Ý¿âÖеÄÊý¾Ýµ¹.. ÏÂһƪ£º°Ù¶È2013У԰ÕÐÆ¸±ÊÊÔÌâ ¨C ÔÆ¼ÆË..

ÆÀÂÛ

ÕÊ¡¡¡¡ºÅ: ÃÜÂë: (ÐÂÓû§×¢²á)
Ñé Ö¤ Âë:
±í¡¡¡¡Çé:
ÄÚ¡¡¡¡ÈÝ: