Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

ÃæÏò OLTP Ó¦ÓóÌÐòµÄÖØÒª SQL Server 2005 ÐÔÄÜÎÊÌâ

ÃæÏò OLTP Ó¦ÓóÌÐòµÄÖØÒª SQL Server 2005 ÐÔÄÜÎÊÌâ
OLTP ¹¤×÷¸ººÉµÄÌØÕ÷ÊÇ´æÔÚ´óÁ¿ÏàËƵÄСÐÍÊÂÎñ¡£
ÔÚ¼ì²éÊý¾Ý¿âÉè¼Æ¡¢×ÊÔ´ÀûÓúÍϵͳÐÔÄܵÄÖØÒªÐÔʱ£¬ÇëÎñ±ØÀμÇÕâЩÌØÕ÷¡£ÏÂÃæ¼òÊöÃæÏò OLTP
Ó¦ÓóÌÐòµÄÖØÒªÐÔÄÜÆ¿¾±»òȱÏÝ¡£
Êý¾Ý
¿âÉè¼ÆÎÊÌâ
³£Óòéѯ´æÔÚ¹ý¶àµÄ±íÁª½Ó¡£ÔÚ OLTP Ó¦ÓóÌÐòÖйý¶àʹÓÃÁª½Ó½«µ¼Ö²éѯÔËÐлºÂý£¬
ÀË·Ñϵͳ×ÊÔ´¡£Í¨³££¬Ó¦¸ÃÖØÐÂÉè¼ÆÊý¾Ý¿â£¬±ÜÃâÐèÒª 5 ¸ö»ò 5 ¸öÒÔÉϱíÁª½ÓµÄƵ·±²Ù×÷¡£
Ƶ·±¸üУ¨°üÀ¨²åÈë¡¢¸üкÍɾ³ý£©µÄ±íÖдæÔÚ¹ý¶àµÄË÷Òýµ¼Ö¶îÍâµÄË÷Òýά»¤¿ªÏú¡£Í¨³££¬OLTP Êý¾Ý¿âµÄÉè¼ÆÖÐÓ¦¸Ã½«Ë÷ÒýÊý±£³ÖΪÕý³£ÔËתǰÌáϵÄ×îСֵ£¬ÕâͬÑùÊÇÓÉÓÚ´óÁ¿ÏàËÆÊÂÎñÓëË÷Òýά»¤³É±¾¹²Í¬×÷ÓõĽá¹û¡£
ÓÉÓÚȱʧË÷Òý£¬µ¼Ö´óÁ¿ IO£¬Èç±íºÍ·¶Î§µÄɨÃè¡£¸ù¾Ý¶¨Ò壬OLTP ÊÂÎñ²»Ó¦ÒªÇó´óÁ¿ IO£¬²¢ÇÒÓ¦¸Ã½ÓÊܼì²é¡£
δʹÓõÄË÷ÒýÔÚ²åÈë¡¢¸üкÍɾ³ýÖе¼ÖÂË÷Òýά»¤³É±¾£¬¶ø¶ÔÈκÎÓû§¶¼Ã»ÓÐÓá£
Ó¦¸ÃÇå³ýδʹÓõÄË÷Òý¡£ÈκÎʹÓùýµÄË÷Òý£¨Í¨¹ýÑ¡Ôñ¡¢¸üлòɾ³ý²Ù×÷£©¶¼³öÏÖÔÚ sys.dm_db_index_usage_stats ÖС£Òò´Ë£¬ÈκÎÒѶ¨Ò嵫²»°üÀ¨ÔÚ´Ë DMV ÖеÄ
Ë÷Òý×ÔÉÏ´ÎÖØÐÂÆô¶¯ SQL Server ÒÔÀ´ÉÐδʹÓùý¡£
CPU
Æ¿
¾±
Ðźŵȴýʱ¼ä³¬¹ý×ܵȴýʱ¼äµÄ 25%¡£Çë²ÎÔÄ sys.dm_os_wait_stats ÖеÄÐźŵȴýʱ¼äºÍ×ܵȴýʱ¼ä¡£Ðźŵȴýʱ¼äÓÃÓÚ¶ÈÁ¿¿ÉÔËÐжÓÁеȴý CPU ʱËù»¨·ÑµÄʱ¼ä¡£Ðźŵȴýʱ¼äÖµºÜ¸ß˵Ã÷³öÏÖ CPU Æ¿¾±¡£
¼Æ
»®ÖØÓÃСÓÚ 90%¡£²éѯ¼Æ»®ÓÃÓÚÖ´ÐÐij¸ö²éѯ¡£OLTP ¹¤×÷¸ººÉ½¨ÒéʹÓüƻ®ÖØÓã¬ÒòΪÖØд´½¨ÏàͬµÄ¼Æ»®£¨ÓÃÓÚÏàËÆ»òÏàͬµÄÊÂÎñ£©ÊÇ¶Ô CPU
×ÊÔ´µÄÀË·Ñ¡£±È½Ï SQL Server SQL Statistics£ºbatch requests/sec Óë SQL
compilations/sec¡£°´ÕÕÈçϹ«Ê½¼ÆËã¼Æ»®ÖØÓ㺼ƻ®ÖØÓà =£¨Åú´¦ÀíÇëÇóÊý — SQL
±àÒëÊý£©/Åú´¦ÀíÇëÇóÊý¡£¼Æ»®ÖØÓùæÔòµÄÌØÀý£ºSQL 2005 SP2
Öв»»º´æ£¨¶ø²»ÊÇÖØÓã©Áã³É±¾¼Æ»®¡£Ê¹ÓÃÁã³É±¾¼Æ»®µÄÓ¦ÓóÌÐò¾ßÓнϵ͵ļƻ®ÖØÓ㬵«Õâ²»ÊÇÐÔÄÜÎÊÌâ¡£
²¢ÐеȴýÀàÐÍ cxpacket ³¬¹ý×ܵȴýʱ¼äµÄ 10%¡£²¢ÐÐÎþÉü CPU ×ÊÔ´»»È¡Ö´ÐÐËٶȡ£Èç¹ûÓдóÁ¿ OLTP£¬²¢Ðвéѯͨ³£»á½µµÍ OLTP ÍÌÍÂÁ¿£¬ËùÒÔÓ¦¾¡Á¿±ÜÃâ¡£Óйصȴýͳ¼ÆÐÅÏ¢£¬
Çë²ÎÔÄ sys.dm_os_wait_stats¡£
ÄÚ´æÆ¿
¾±
Average
Page Life Expectancy ³ÖÐø½ÏµÍ¡£Çë²ÎÔÄ Perfmon ¶ÔÏó SQL Server Buffer Manager ÖеÄ
Average Page Life Expectancy ¼ÆÊýÆ÷£¨±íʾһҳÔÚ»º´æÖÐÍ£ÁôµÄƽ¾ù
ÃëÊý£©¡


Ïà¹ØÎĵµ£º

¡¾Õª¡¿´æ´¢¹ý³Ì±È½Ï¶¯Ì¬SQLµÄÓŵãÔÚÄÄÀï

´æ´¢¹ý³Ì¸ú¶¯Ì¬sqlÏà±ÈÓÐÈçÏÂÓŵ㣺
1¡¢ ´æ´¢¹ý³ÌÔÊÐí±ê×¼×é¼þʽ±à³Ì
´æ´¢¹ý³ÌÔÚ±»´´½¨ÒÔºó¿ÉÒÔÔÚ³ÌÐòÖỶà´Îµ÷Óöø²»±ØÖØбàд¸Ã´æ´¢¹ý³ÌµÄSQL
Óï¾ä¶øÇÒÊý¾Ý¿âרҵÈËÔ±¿ÉËæʱ¶Ô´æ´¢¹ý³Ì½øÐÐÐ޸ĵ«¶ÔÓ¦ÓóÌÐòÔ´´úÂëºÁÎÞÓ°ÏìÒò
ΪӦÓóÌÐòÔ´´úÂëÖ»°üº¬´æ´¢¹ý³ÌµÄµ÷ÓÃÓï¾ä´Ó¶ø¼«´óµØÌá¸ßÁ˳ÌÐòµÄ¿ÉÒÆÖ²ÐÔ
2 ¡¢´æ´¢¹ý³Ì ......

[SQL Server]¹ØÓÚ¶Ôʱ¼ä´ÁtimestampÀí½â

Ò»Ö±¶Ôʱ¼ä´ÁµÄ¸ÅÄîÄ£ºý£¬²¢ÇÒÍøÉÏÒ²ÓкܶàÅóÓÑÒ²¶¼ÎóÈÏΪ£ºÊÇÒ»¸öʱ¼ä×ֶΣ¬Ã¿´ÎÔö¼ÓÊý¾Ýʱ£¬ÌîÈ뵱ǰµÄʱ¼äÖµ¡£µ¼ÖÂÒ²Îóµ¼Á˺ܶàÅóÓÑ¡£
 
Õâ´Î¿´Á˺ܶà×ÊÁÏ£¬¾ÀÕýÒ»ÏÂÕâ¸ö´íÎó£¬×Ô¼ºÒ²¸ãÇå³þ£ºÊý¾Ý¿âÖÐ×Ô¶¯Éú³ÉµÄΨһ¶þ½øÖÆÊý×Ö£¬Óëʱ¼äºÍÈÕÆÚÎ޹صģ¬ ͨ³£ÓÃ×÷¸ø±íÐмӰ汾´ÁµÄ»úÖÆ¡£´æ´¢´óСΪ 8 ¸ö×Ö½Ú¡£
&nbs ......

Êý¾Ý¿âÃüÃû¹æ·¶£¨ÊÊÓÃSQL Server£©

Éè¼ÆÔ­Ôò
 
·ûºÅÈý´ó·¶Ê½£¨Ã¿Ò»Áбí´ïÒ»¸öÒâ˼£¬Ã¿Ò»Ðдú±íÒ»¸öʵÀý/ÿһÐÐÓÐΨһ¼ü/±íÄÚûÓÐÆäËü±íµÄ·ÇÖ÷¼üÐÅÏ¢£©
 
ÿ¸ö±íÓ¦¸ÃÓеÄ3¸öÓÐÓÃ×ֶΣ¨¼Ç¼´´½¨»ò¸üÐÂʱ¼ä/¼Ç¼´´½¨Õß/¼Ç¼°æ±¾£©
 
±ÜÃâ±£Áô×Ö
 
±íÓ¦±ÜÃâ¿ÉΪ¿ÕµÄÁÐ


 
ÃüÃû¹æ·¶
 
±í
±íÃûÈçOr ......

SQL 2000 Insert·µ»Ø×Ô¶¯±àºÅidÈýÖÖ·½·¨±È½Ï


SQL Server 2000ÖУ¬insertÊý¾ÝµÄʱºò·µ»Ø×Ô¶¯±àºÅµÄid£¬ÓÐÈýÖÖ·½·¨ÊµÏÖSCOPE_IDENTITY¡¢IDENT_CURRENT ºÍ @@IDENTITY£¬ËüÃǶ¼·µ»Ø²åÈëµ½ IDENTITY ÁÐÖеÄÖµ¡£
IDENT_CURRENT £º·µ»ØΪÈκλỰºÍÈκÎ×÷ÓÃÓòÖеÄÌض¨±í×îºóÉú³ÉµÄ±êʶֵ¡£IDENT_CURRENT ²»ÊÜ×÷ÓÃÓòºÍ»á»°µÄÏÞÖÆ£¬¶øÊÜÏÞÓÚÖ¸¶¨µÄ±í¡£IDENT_CURRENT ·µ»ØΪÈÎ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ