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

MySQL ÄÚ´æÄ£ÐÍ hust ei

¶ÔÓÚÈκÎÒ»¸öÊý¾Ý¿â¹ÜÀíϵͳÀ´Ëµ£¬ÄÚ´æµÄ·ÖÅäʹÓþø¶Ô¿ÉÒÔËãµÄÉÏÊÇÆäºËÐÄÖ®Ò»ÁË£¬ËùÒԺܶàÏ£Íû¸üΪÉîÈëÁ˽âijÊý¾Ý¿â¹ÜÀíϵͳµÄÈË£¬¶¼»áÏ£ÍûÒ»¿ú¾¿¾¹£¬ÎÒÒ²²»ÀýÍâ¡£
´ÓÄÚ´æµÄʹÓ÷½Ê½MySQL Êý¾Ý¿âµÄÄÚ´æʹÓÃÖ÷Òª·ÖΪÒÔÏÂÁ½Àà
* Ï̶߳ÀÏíÄÚ´æ
* È«¾Ö¹²ÏíÄÚ´æ
½ñÌìÕâƪÎÄÕÂÔÝʱÏÈ·ÖÎö MySQL ÖÐÖ÷ÒªµÄ “Ï̶߳ÀÏíÄÚ´æ” µÄ¡£
ÔÚ MySQL ÖУ¬Ï̶߳ÀÏíÄÚ´æÖ÷ÒªÓÃÓÚ¸÷¿Í»§¶ËÁ¬½ÓÏ̴߳洢¸÷ÖÖ²Ù×÷µÄ¶ÀÏíÊý¾Ý£¬ÈçÏß³ÌÕ»ÐÅÏ¢£¬·Ö×éÅÅÐò²Ù×÷£¬Êý¾Ý¶Áд»º³å£¬½á¹û¼¯ÔÝ´æµÈµÈ£¬¶øÇÒ´ó¶àÊý¿ÉÒÔͨ¹ýÏà¹Ø²ÎÊýÀ´¿ØÖÆÄÚ´æµÄʹÓÃÁ¿¡£
Ïß³ÌÕ»ÐÅϢʹÓÃÄÚ´æ(thread_stack)£ºÖ÷ÒªÓÃÀ´´æ·Åÿһ¸öÏß³Ì×ÔÉíµÄ±êʶÐÅÏ¢£¬ÈçÏß³Ìid£¬Ïß³ÌÔËÐÐʱ»ù±¾ÐÅÏ¢µÈµÈ£¬ÎÒÃÇ¿ÉÒÔͨ¹ý thread_stack ²ÎÊýÀ´ÉèÖÃΪÿһ¸öÏß³ÌÕ»·ÖÅä¶à´óµÄÄÚ´æ¡£
ÅÅÐòʹÓÃÄÚ´æ(sort_buffer_size)£ºMySQL ÓôËÄÚ´æÇøÓò½øÐÐÅÅÐò²Ù×÷£¨filesort£©£¬Íê³É¿Í»§¶ËµÄÅÅÐòÇëÇó¡£µ±ÎÒÃÇÉèÖõÄÅÅÐòÇø»º´æ´óСÎÞ·¨Âú×ãÅÅÐòʵ¼ÊËùÐèÄÚ´æµÄʱºò£¬MySQL »á½«Êý¾ÝдÈë´ÅÅÌÎļþÀ´Íê³ÉÅÅÐò¡£ÓÉÓÚ´ÅÅ̺ÍÄÚ´æµÄ¶ÁдÐÔÄÜÍêÈ«²»ÔÚÒ»¸öÊýÁ¿¼¶£¬ËùÒÔsort_buffer_size²ÎÊý¶ÔÅÅÐò²Ù×÷µÄÐÔÄÜÓ°Ïì¾ø¶Ô²»¿ÉСÊÓ¡£ÅÅÐò²Ù×÷µÄʵÏÖÔ­ÀíÇë²Î¿¼£ºMySQL Order By µÄʵÏÖ·ÖÎö¡£
Join²Ù×÷ʹÓÃÄÚ´æ(join_buffer_size)£ºÓ¦ÓóÌÐò¾­³£»á³öÏÖһЩÁ½±í£¨»ò¶à±í£©JoinµÄ²Ù×÷ÐèÇó£¬MySQLÔÚÍê³ÉijЩ Join ÐèÇóµÄʱºò£¨all/index join£©£¬ÎªÁ˼õÉÙ²ÎÓëJoinµÄ“±»Çý¶¯±í”µÄ¶ÁÈ¡´ÎÊýÒÔÌá¸ßÐÔÄÜ£¬ÐèҪʹÓõ½ Join Buffer À´Ð­ÖúÍê³É Join²Ù×÷£¨¾ßÌå Join ʵÏÖËã·¨Çë²Î¿¼£ºMySQL ÖÐµÄ Join »ù±¾ÊµÏÖÔ­Àí£©¡£µ± Join Buffer ̫С£¬MySQL ²»»á½«¸Ã Buffer ´æÈë´ÅÅÌÎļþ£¬¶øÊÇÏȽ«Join BufferÖеĽá¹û¼¯ÓëÐèÒª Join µÄ±í½øÐÐ Join ²Ù×÷£¬È»ºóÇå¿Õ Join Buffer ÖеÄÊý¾Ý£¬¼ÌÐø½«Ê£ÓàµÄ½á¹û¼¯Ð´Èë´Ë Buffer ÖУ¬Èç´ËÍù¸´¡£ÕâÊƱػáÔì³É±»Çý¶¯±íÐèÒª±»¶à´Î¶ÁÈ¡£¬³É±¶Ôö¼Ó IO ·ÃÎÊ£¬½µµÍЧÂÊ¡£
˳Ðò¶ÁÈ¡Êý¾Ý»º³åÇøʹÓÃÄÚ´æ(read_buffer_size)£ºÕⲿ·ÖÄÚ´æÖ÷ÒªÓÃÓÚµ±ÐèҪ˳Ðò¶ÁÈ¡Êý¾ÝµÄʱºò£¬ÈçÎÞ·¢Ê¹ÓÃË÷ÒýµÄÇé¿öϵÄÈ«±íɨÃ裬ȫË÷ÒýɨÃèµÈ¡£ÔÚÕâÖÖʱºò£¬MySQL °´ÕÕÊý¾ÝµÄ´æ´¢Ë³ÐòÒÀ´Î¶ÁÈ¡Êý¾Ý¿é£¬Ã¿´Î¶ÁÈ¡µÄÊý¾Ý¿ìÊ×ÏÈ»áÔÝ´æÔÚread_buffer_sizeÖУ¬µ± buffer ¿Õ¼ä±»Ð´Âú»òÕßÈ«²¿Êý¾Ý¶ÁÈ¡½áÊøºó£¬ÔÙ½«bufferÖеÄÊý¾Ý·µ»Ø¸øÉϲãµ÷ÓÃÕߣ¬ÒÔÌá¸ßЧÂÊ¡£
Ëæ»ú¶ÁÈ¡Êý¾Ý»º³åÇøʹÓÃÄÚ´æ(read_rnd_buffer_size)£ººÍ˳Ðò¶ÁÈ¡Ïà¶ÔÓ¦£¬µ± MySQL


Ïà¹ØÎĵµ£º

mysqlÖеÄSQL·ÖÎö¹¤¾ß

Another Look at MySQL 5.1's SQL Diagnostic Tools
http://dev.mysql.com/tech-resources/articles/mysql_51_diagnostic_tools.html Êý¾Ý¿âµÄÐÔÄܾö¶¨ÒòËØ£º
£¨1£©Êý¾Ý¿âµÄÉè¼Æ
£¨2£©SQL´úÂë ¿ÉÒÔÓÃÒÔϼ¸ÖÖ·½·¨À´½â¾öһЩÐÔÄÜÎÊÌ⣺
£¨1£©Ë÷Òý
£¨2£©Ë®Æ½·ÖÇø
£¨3£©ÁÐÊÊÓ¦µÄ±í
colum ......

ÈçºÎ±£»¤MySQLÖеÄÖØÒªÊý¾Ý

ÔÚÈÕ³£µÄ¹¤×÷ÖУ¬±£»¤Êý¾ÝÃâÊÜδÊÚȨÓû§µÄÇÖ·¸ÊÇϵͳ¹ÜÀíÔ±Ìرð¹ØÐĵÄÎÊÌâ¡£Èç¹ûÄãÄ¿Ç°ÓõÄÊÇMySQL£¬¾Í¿ÉÒÔʹÓÃһЩ·½±ãµÄ¹¦ÄÜÀ´±£»¤ÏµÍ³£¬À´´ó´ó¼õÉÙ»úÃÜÊý¾Ý±»Î´ÊÚȨÓû§·ÃÎʵķçÏÕ¡£
ÆóÒµ×îÓмÛÖµµÄ×ʲúͨ³£ÊÇÆäÊý¾Ý¿âÖеĿͻ§»ò²úÆ·ÐÅÏ¢¡£Òò´Ë£¬ÔÚÕâЩÆóÒµÖУ¬Êý¾Ý¿â¹ÜÀíµÄÒ»¸öÖØÒª²¿·Ö¾ÍÊDZ£»¤ÕâЩÊý¾ÝÃâÊÜÍⲿ¹¥»÷£ ......

MySQL´¥·¢Æ÷½â¾ö·½°¸Àú³Ì

×î½ü£¬ÏîÄ¿ÖÐÓõ½mysql£¬ÓÉÓÚÊý¾ÝÁ¿·Ç³£´ó£¬Ã¿ÌìµÄÊý¾ÝÁ¿ÔÚ°ÙÍò¼¶£¬¿¼Âǵ½mysqlÊý¾Ý¿â´¦ÀíÐÔÄÜÒÔ¼°Êý¾ÝÊôÐÔ£¬¾ö¶¨±£´æ×ã¹»¶àµÄ²éѯÊý¾Ý¼´¿É£¬¾àµ±Ç°Ê±¼ä×î¾ÃÔ¶µÄÊý¾ÝÖ±½Óɾ³ý£¬ÎÞÐè½øÐб¸·Ý¡£
Í·ÄÔÖÐð³öµÄµÚÒ»¸öÏë·¨¾ÍÊÇ£¬ÄÜ·ñÀûÓÃmysqlÖеĴ¥·¢Æ÷£¬¼ì²éÊý¾Ý±í´óС£¬Èç¹û³¬¹ýÔ¤É賤¶È£¬Ôòɾ³ý²¿·ÖÊý¾Ý¡£
CREATE TRIGGER ......

mysql´æ´¢ÒýÇæµÄË÷Òý¶Ô±È

´æ´¢ÒýÇæ Ö§³ÖË÷Òý myisam b-tree,r-tree,full-text,²»Ö§³Öhash innodb b-tree(clustered-index) merge b-tree,r-tree memory b-tree,hash archive ÎÞË÷Òý ......

mysql ½«±íÖÐÊý¾Ýµ¼³ö £¨linux£©

½ñÌìÓöµ½Òªµ¼³öÊý¾Ý¿âÖбíµÄÊý¾Ý¡£ÏÂÃæÕâ¸ö¾Í¿ÉÒԸ㶨¡£¡£
#µ¼³öÖ¸¶¨µÄ±í #µ¼³öÃüÁî -uÓû§Ãû -pÃÜÂë -hÖ÷»úIPµØÖ· Êý¾Ý¿âÃû ±íÃû1 ±íÃû2 > µ¼³öÎļþ.sql
mysqldump -uroot -proot -h192.168.0.88 ok_db oktable1 oktable2 > ok_db.sql
ÁíÍâÔÚ¸ü¸ÄmysqlÃÜÂëʱºò£¬ÍøÉÏÓÐЩÃüÁî²»¶Ô£º
ÎÒÓÃÈçÏ£ºset password=pas ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ