¹ØÓÚSQLÓÅ»¯
˵¾ä´ó·Ï»°£¬ÄǾÍÊÇ“ºÏÀíµÄƽºâ¸÷ÖÖ×ÊÔ´µÄʹÓÃ,ÄÚ´æ,cpu,io µÈµÈ”¡£ÕâÒ²ÊǺÜÓеÀÀíµÄ£¬µ«ÊÇʵ¼Ê¾Í²»ºÃ×öÁË£¬ÈçºÎƽºâÄØ£¿
¾ßÌåµãµÄô£¬Í¨¹ý±È½Ï£¬Ó¦¸ÃÊÇÏìӦʱ¼ä×öΪÖ÷ÒªµÄÆÀÅÐÒòËØÁË¡£µ«ÊÇ¿ÉÄÜÓÉÓÚһЩ²»È·¶¨µÄÒòËØ£¬¿ÉÄÜ»á³öÏÖ£ºÕâ´ÎÅܵĿ죬²»µÈÓÚÏ´ÎÒ²ÅܵĿìÁË¡£
ÄǾÍÒª¸ù¾Ý±íµÄÊý¾ÝÁ¿µÄ±ä»¯£¬È·¶¨Ò»¸ö±È½ÏºÏÀíµÄÖ´Ðмƻ®ÁË£¬Ö÷Òª»¹ÊÇÒª½µµÍÂß¼¶ÁΪµ÷ÓŵÄÄ¿±ê£¬ÆäʵÎïÀí¶ÁÒâÒå²»´ó£¬Ò»¸ösqlÓï¾äµÚÒ»´ÎÖ´ÐÐÎïÀí¶Á¿Ï¶¨ÊǺܴóµÄ£¬µ½Á˵Ú2´ÎÎïÀí¶ÁÒ²Ðí¾ÍºÜСÁË¡£
ij¸ßÈË˵£º
ÔÚÊý¾Ý¿âÕûÌåÉÏÀ´½²£¬ÊÇÒª½µµÍ ÎïÀí¶Á
¶ø¶ÔÓÚµ¥Ìõ sql À´½²£¬ÊÇÒÔÂß¼¶ÁµÄ½µµÍΪ±ê×¼µÄ
µÀÀíºÜ¼òµ¥£¬¶ÔÓÚµ¥ÌõsqlÀ´Ëµ£¬Èç¹û·´¸´ÔËÐУ¬ÎïÀí¶Á¾ö¶¨ÓÚ data buffer µÄ´óС £¬µÚÒ»´ÎÔËÐÐ ºÍ µÚ¶þ´ÎÔËÐÐÒ²ÊDz»Ò»ÑùµÄ¡£
µ«±È½ÏÎȶ¨µÄÊÇ Âß¼¶Á¡£ Èç¹ûÒÔÎïÀí¶ÁΪ±ê×¼£¬ÄÇÄѵÀÎïÀí¶ÁΪ0µÄsql¾ÍÊǺÃsql ÁË£¿Èç¹ûsqlµÄÂß¼¶Á¶¼Á¼ºÃ£¬ÄÇÊý¾Ý¿âÕûÌåµÄÎïÀí¶Á½µÏÂÀ´Ò²ÊǺÜ×ÔÈ»µÄÊÂÇé
¸ßÈËÓÖ˵£º
ÁÙʱ¶ÎÊDz»»áÉú²úredo µÄ
buffer gets ¾Í¿ÉÒÔÀí½âΪ ¶Ô buffer cache ÖÐ buffer µÄ·ÃÎÊ buffer*´Î £¬Ò²¿ÉÒÔ¿´×ö·ÃÎ浀 bufferÊýÁ¿£¬µ±È»¿ÉÄÜ´æÔÚ×ÅÒ»¸öbuffer±»·ÃÎʶà´ÎµÄÇé¿ö
ÖÁÓÚ buffer gets£¬Èç¹û·ÃÎʵĿ鲻ÔÚÄÚ´æÖÐ×ÔÈ»¾Í²úÉúÎïÀí¶Á£¬¿ÉÎïÀí¶Á²¢²»Ó°Ïìbuffer gets ,ÒòΪ¶ÔÊý¾ÝµÄ·ÃÎÊ×îÖÕÊÇÔÚÄÚ´æÖÐÍê³ÉµÄ£¬ËäÈ»¶îÍâµØÓÐÎïÀí¶Á¡£
db block gets ½ö½ö±íʾ ÀàËÆdmlÕâÀà²Ù×÷È¥·ÃÎÊÊý¾Ý¿é£¬dml ²Ù×÷Êý¾Ý×îÖÕÒ²ÊÇÔÚ·ÃÎÊbufferµÄ¹ý³ÌÖÐÍê³ÉµÄ°¡£¬¶ø consistent gets ±íʾÀàËÆ selectÕâÑùµÄ²éѯȥ·ÃÎÊbuffer¡£ ¸üÑϸñÀ´Ëµ£¬ÊǽРcurrent mode and query mode .ÕâÊÇoracleµÄ¶ÁÒ»ÖÂÐÔµÄÌصã¾ö¶¨µÄ
Ïà¹ØÎĵµ£º
΢ÈíµÄÒ»¸öMicrosoft Visual Studio International Pack v1.0£¬ÀïÃæ¾ÍÓÐÖÐÎÄ×Ö´¦Àí¹¦ÄÜ£¬»¹±È½Ï·á¸»£¬ÕâÀïÖ»Óüò·±×ª»»¡£Microsoft Visual Studio International Pack v1.0µÄÏÂÔصØÖ·£ºhttp://download.microsoft.com/download/5/7/3/57345088-ACF8-4E9B-A9A7-EBA35452DEF2/vsintlpack1.zip¡£½âѹ֮ºó°²×°CHTC ......
Ö´ÐÐ˳Ðò:´Ó×óµ½ÓÒ,±äÁ¿ÓÅÏÈ,ÖðÐиüÐÂ
Õª×ÔCSDNµÄÀý×Ó(http://topic.csdn.net/u/20091030/16/7fd75fa6-bdb9-4516-9b27-48aef69703ba.html
http://topic.csdn.net/u/20090904/16/e5dad9c7-fb59-41b9-b28d-e3b71c3e8420.html)
1.±äÁ¿ÓÅÏÈ
create table #t (field1 varchar(10),field2 varchar(10))
insert #t sel ......
SQLÓï¾äÏÈǰдµÄʱºò£¬ºÜÈÝÒ×°ÑһЩÌØÊâµÄÓ÷¨Íü¼Ç£¬ÎÒÌØ´ËÕûÀíÁËÒ»ÏÂSQLÓï¾ä²Ù×÷£¬·½±ã×Ô¼ºÐ´SQLʱ·½±ãÒ»µã£¬ÏëÌùÉÏÀ´£¬Ò»Æð¿´¿´£¬Í¬Ê±Ï£Íû´ó¼ÒÄܹ²Í¬¶à¶àÌáÒâ¼û£¬Ò²¸øÎÒÁôһЩ¸üºÃµÄ¼Ñ¾ä£¬ÕûÀíÒ»·Ý¡¶¾«ÃîSQLËÙ²éÊֲᡷ£¬²»Áߴͽ̣¡
Ò»¡¢»ù´¡
1¡¢ËµÃ÷£º´´½¨Êý¾Ý¿â
CREATE DATABASE database-name
2¡¢ËµÃ÷£ºÉ¾³ýÊý¾ ......
ÉÏÃæÎÒÃÇÌáµ½µÄÊÇһЩ»ù±¾µÄÌá¸ß²éѯËٶȵÄ×¢ÒâÊÂÏî,µ«ÊÇÔÚ¸ü¶àµÄÇé¿öÏÂ,ÍùÍùÐèÒª·´¸´ÊÔÑé±È½Ï²»Í¬µÄÓï¾äÒԵõ½×î¼Ñ·½°¸¡£×îºÃµÄ·½·¨µ±È»ÊDzâÊÔ£¬¿´ÊµÏÖÏàͬ¹¦ÄܵÄSQLÓï¾äÄĸöÖ´ÐÐʱ¼ä×îÉÙ£¬µ«ÊÇÊý¾Ý¿âÖÐÈç¹ûÊý¾ÝÁ¿ºÜÉÙ£¬ÊDZȽϲ»³öÀ´µÄ£¬Õâʱ¿ÉÒÔÓò鿴ִÐмƻ®£¬¼´£º°ÑʵÏÖÏàͬ¹¦ÄܵĶàÌõSQLÓï¾ä¿¼µ½²éѯ·ÖÎöÆ÷£¬°´ ......
×ܽáÒ»ÏÂSQLÓï¾äÖÐÒýºÅ(')¡¢quotedstr()¡¢('')¡¢format()ÔÚSQLÓï¾äÖеÄÓ÷¨ÒÔ¼°SQLÓï¾äÖÐÈÕÆÚ¸ñʽµÄ±íʾ(#)¡¢('')
ÔÚDelphiÖнøÐÐ×Ö·û±äÁ¿Á¬½ÓÏà¼Óʱµ¥ÒýºÅÓÃ('''),ÓÖÒýºÅÓÃ('''')±íʾ
Ê×Ïȶ¨Òå±äÁ¿
var
AnInt:integer=123;//ΪÁË·½±ãÔڴ˶¼¸øËüÃǸ³³õÖµ¡£ËäÈ»¿ÉÄÜÔÚÒý¸³³õÖµÔÚijЩÇé¿öϲ»¶Ô
AnIntStr:string='456'; ......