mysql¹ØÓÚÍøÉÏÁ÷תµÄ£¬Éú³É£³£¬£¶Ö®¼äµÄËæ»úÕûÊý
Èç¹ûÄãËÑË÷GOOGLE£¬Äã»áÕÒµ½ºÜ¶à¹ØÓÚmysqlµÄËæ»úÊý£¬ËûÃÇ»áÕâÑù˵
Éú³É£³£¬£¶Ö®¼äµÄËæ»úÕûÊý
FLOOR(3 + (RAND() * 6))
ÔÚ4ºóÃæÌí¼ÓÒ»¸ö3µ½6Ö®¼äµÄÕûÊý
CONCAT(343,FLOOR(3 + (RAND() * 6)))
ÔÚijһ×ֶκóÃæÌí¼Óһλ£³£¬£¶Ö®¼äµÄÕûÊý
UPDATE test SET xx= CONCAT(xx,FLOOR(3 +(RAND() * 6)));
µ«ÊÇÎÒ˽×Ô²âÊÔÁËһϣ¬·¢ÏÖÕâÑù×öµÄ»°£¬²úÉúµÄËæ»úÊý»áÊÇ3-9Ö®¼äµÄ¡£×Ðϸ·ÖÎöÒ»¿´£¬·¢ÏÖÒ»¸öÎÊÌ⣺Rand()*6»á²úÉú0µ½6Ö®¼äµÄËæ»úÊý£¬Èç¹ûÔÙ¼ÓÉÏÒ»¸ö3µÄ»°£¬²úÉúµÄËæ»úÊý£¬×ÔÈ»¾ÍÊÇ3-9Ö®¼äµÄÁË¡£²»ÖªµÀÍøÉÏÕâô¶àÈËתÕâ¸öÌù×Ó£¬ÊDz»ÊÇÕæµÄ×Ô¼ºÊÔ¹ý£¬Ïë¹ý£¿
Ïà¹ØÎĵµ£º
THREAD_CACHE MySQLÀïÃæÎªÁËÌá¸ß¿Í»§¶ËÇëÇó´´½¨Á¬½Ó¹ý³ÌµÄÐÔÄÜ,ÌṩÁËÒ»¸öÁ¬½Ó³ØÒ²¾ÍÊÇThread_Cache³Ø,½«¿ÕÏеÄÁ¬½ÓÏ̷߳ÅÔÚÁ¬½Ó³ØÖÐ,¶ø²»ÊÇÁ¢¼´Ïú»Ù.ÕâÑùµÄºÃ´¦¾ÍÊÇ,µ±ÓÖÓÐÒ»¸öеÄÇëÇóµÄʱºò,mysql²»»áÁ¢¼´È¥´´½¨Á¬½ÓÏß³Ì,¶øÊÇÏÈÈ¥Thread_CacheÖÐÈ¥²éÕÒ¿ÕÏеÄÁ¬½ÓÏß³Ì,Èç¹û´æÔÚÔòÖ±½ÓʹÓÃ,²»´æÔڲŴ´½¨ÐµÄÁ¬½ÓÏß³Ì. ÓÐ ......
Õ⼸Ì죬ÏîÄ¿ÖÐÓиöÐèÇ󣬵½Êý¾Ý¿âÕâ²½µÄ½á¹û¾ÍÊÇÐèÒªÅúÁ¿updateµÄÊý¾Ý£¬×ܲ»ÄÜÑ»·Ê¹ÓÃupdate....set...°É£¬ÕâÑùÏÔʾЧÂÊÊǺܵͣ¬ÎªÁ˽â¾öÕâ¸öÎÊÌ⣬´ó¼ÒÒ²ÊÇÏëÁ˺ܶàµÄ°ì·¨¡£
ÏÈ˵Õ⼸¸ö½â¾ö·½°¸£º
1£ºÑ»·update²Ù×÷£ºÊ²Ã´¶¼²»ËµÁË£¬ÏÔÈ»ÌÔÌÁË£»
2£º ......
ÒÔÏÂÊÇÉæ¼°µ½²åÈë±í¸ñµÄ²éѯµÄ5ÖָĽø·½·¨£º
1)ʹÓÃLOAD DATA INFILE´ÓÎı¾ÏÂÔØÊý¾ÝÕ⽫±ÈʹÓòåÈëÓï¾ä¿ì20±¶¡£
2)ʹÓôøÓжà¸öVALUESÁбíµÄINSERTÓï¾äÒ»´Î²åÈ뼸ÐÐÕ⽫±ÈʹÓÃÒ»¸öµ¥ÐвåÈëÓï¾ä¿ì¼¸±¶¡£µ÷Õûbulk_insert_buffer_size±äÁ¿Ò²ÄÜÌá¸ß£¨Ïò°üº¬Ðеıí¸ñÖУ©²åÈëµÄËÙ¶È¡£
3)¿ÉÒÔ¶Ômyisam±í²¢ÐвåÈëConcurrent_i ......
MYSQL--my.cnfÅäÖÃÖÐÎÄÏê½â ZZ2007Äê08ÔÂ16ÈÕ ÐÇÆÚËÄ 15:53mysqld³ÌÐò--Ŀ¼ºÍÎļþ
ÒýÓÃ
basedir = path ʹÓøø¶¨Ä¿Â¼×÷Ϊ¸ùĿ¼(°²×°Ä¿Â¼)¡£
character-sets-dir = path ¸ø³ö´æ·Å×Å×Ö·û¼¯µÄĿ¼¡£
datadir = path ´Ó¸ø¶¨Ä¿Â¼¶ÁÈ¡Êý¾Ý¿âÎļþ¡£
pid-file = filename Î ......
1.INµÄÓ÷¨
IN(value,value1,...) valuesµÄ¸öÊý¸úmax_allowed_packetÏà¹Ø£¬SELECT 2 IN (2,4,'STRING');
NOT IN(value,..)ºÍINÓï·¨Ò»Ñù¡£
2.IF NOT EXISTS
CREATE ... IF NOT EXISTS stm; ...¿ÉÒÔʹDATABASE,TABLE,EVENT¡£ÈçCREATE TABLE IF NOT EXISTS t(id INT);
3.MD5,MySQLÊý¾Ý¿âÌṩÁËmd5¼ÓÃܹ¦Ä ......