MySQL´´½¨¹ØÁª±í
MySQL´´½¨¹ØÁª±í¿ÉÒÔÀí½âΪÊÇÁ½¸ö±íÖ®¼äÓиöÍâ¼ü¹Øϵ£¬µ«ÕâÁ½¸ö±í±ØÐëÂú×ãÈý¸öÌõ¼þ
1.Á½¸ö±í±ØÐëÊÇInnoDBÊý¾ÝÒýÇæ
2.ʹÓÃÔÚÍâ¼ü¹ØϵµÄÓò±ØÐëΪË÷ÒýÐÍ(Index)
3.ʹÓÃÔÚÍâ¼ü¹ØϵµÄÓò±ØÐëÓëÊý¾ÝÀàÐÍÏàËÆ
ÏÂÃæ·Ö±ð½¨Á½¸ö±íÀ´ËµÃ÷Ò»ÏÂ:
Create TABLE IF NOT EXISTS `books` (
`book_id` smallint(6) NOT NULL auto_increment COMMENT 'Êé¼®±àºÅ',
`book_name` char(20) NOT NULL COMMENT 'ÊéÃû',
`book_pic` varchar(200) NOT NULL COMMENT '·âÃæ',
`book_author` char(20) NOT NULL COMMENT '×÷Õß',
`book_pub` char(40) NOT NULL COMMENT '³ö°æÉç',
`book_sort` char(6) NOT NULL COMMENT '·ÖÀà',
`book_owner` char(6) default NULL COMMENT 'ËùÓÐÕß',
`book_borrower` char(7) default NULL COMMENT '½èÔÄÕß',
`book_borrower_time` date default NULL COMMENT '½èÔÄʱ¼ä',
PRIMARY KEY (`book_id`),
INDEX (book_borrower))
ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_general_ci AUTO_INCREMENT=5 ;
Create TABLE IF NOT EXISTS `parts` (
`part_id` smallint(6) NOT NULL COMMENT '³ÉÔ±±àºÅ',
`part_name` varchar(6) NOT NULL COMMENT '³ÉÔ±Ãû',
`part_mail` varchar(
Ïà¹ØÎĵµ£º
ÔÚ½²MySQLµÄJoinÓ﷨ǰ»¹ÊÇÏȻعËÒ»ÏÂÁª½áµÄÓï·¨£¬ºÇºÇ£¬ÆäʵÁ¬ÎÒ×Ô¼º¶¼ÍüµÃ²î²»¶àÁË£¬ÄǾʹó¼ÒÒ»ÆðÎÂÏ°°É£¨Èç¹ûÄÚÈÝÓдíÎó»òÓÐÒÉÎÊ£¬¹úÄÚ¹ØÓÚMySQLÁª½á²éѯµÄ×ÊÁÏÊ®·ÖÉÙ£¬ÏàÐÅ´ó¼ÒÔÚ¿´Á˱¾Îĺó»á¶ÔMySQLÁª½áÓï·¨ÓÐÏ൱ÇåÎúµÄÁ˽⣬Ҳ²»»á±»OracleµÄÍâÁª½áµÄ£¨“£«”ºÅ£©ÅªµÃºýÍ¿ÁË¡£
ÔÚSQL±ê×¼Öй滮µÄ£¨ ......
ÏñPHPºÍperlÒ»Ñù£¬MySQLÒ²ÌṩµÄCÓïÑÔʹÓõÄAPI. C´úÂëµÄAPIÊÇËæMySQLÒ»Æð·¢²¼µÄ¡£ Ëü°üº¬ÔÚmysqlclient¿âÖУ¬ ¿ÉÒÔʹC³ÌÐòÀ´·ÃÎÊÊý¾Ý¿â¡£
MySQLÔ´Âë°üÖеÄÐí¶à¿Í»§¶Ë¶¼ÊÇÓÃCдµÄ¡£ Èç¹ûÄãÕýÔÚÕÒʹÓÃÕâЩC APIµÄÀý×Ó£¬ ¿ÉÒÔ¿´¿´¿Í»§¶ËµÄд·¨¡£Äã¿ÉÒÔÔÚMySQLÔ´Âë°üµÄclientsĿ¼ÕÒµ½ÕâЩÀý×Ó¡£
& ......
Vs2005Á¬½ÓmysqlÊý¾Ý¿â
Ò»¡¢ÏÂÔØÖ§³ÖmysqlµÄ΢ÈíµÄͨÓÃÀàmysql-connector-net-1.0.7-noinstall.zip
¶þ¡¢ÏÂÔصØÖ·http://www.cnblogs.com/eugenewu0808/archive/2006/10/11/mysqldata.html
Èý¡¢½âѹÎļþ
ËÄ¡¢Ìí¼ÓÒýÓÃÕÒµ½binÎļþ¼ÐÕÒµ½net-2.0 vs2005µÄ£¨ºÍvsÏàÓ¦°æ±¾µÄ£©ÕÒµ½MySql.Data.dll
Îå¡¢ÔÚÀàÖÐÒýÓÃusing MySq ......
×òÌìºÍͬѧÏÐÁÄʱ,̸µ½ÁËÊý¾Ý¿âµÄÒýÇæÊÇʲô,½ñÌìÔÚÍøÉÏËÑË÷Á˺ܾÃ,ҲûÓз¢ÏֱȽÏÈ«ÃæµÄ˵Ã÷¸÷¸öÊý¾Ý¿âµÄËÑË÷ÒýÇæ·½ÃæµÄ.
MySQLÒýÇæÊÇʲô,
MySQLÊÇÎÒÃDZȽϳ£ÓõÄÒ»ÖÖÊý¾Ý¿âÈí¼þ¡£ËüÓÐ×ÅÖî¶àµÄÓŵ㣬È翪ԴµÄ£¬Ãâ·ÑµÄµÈµÈ¡£ÆäʵËü»¹ÓÐÒ»¸öºÜºÃµÄÌص㣬ÄǾÍÊÇÓжàÖÖÒýÇæ¿ÉÒÔ¹©ÄãÑ¡Ôñ¡£Èç¹ûÈü³µÊÖÄܸù¾Ý²»Í¬µÄ·¿ö£¬µØÐÎ ......
±à¼my.cnfÎļþ£¬¼ÓÈ룺
log-slow-queries[=file] #ĬÈÏΪdataĿ¼ÏµÄhostname-slow.logÎļþ
long_query_time=10 (seconds) #Âý²éѯµÄthreshold
log-queries-not-using-indexes #¼Ç¼²»Ê¹ÓÃË÷ÒýµÄ²éѯ
mysqldumpslowÃüÁî»ñµÃÈÕÖ¾ÖÐÏÔʾµÄ²éѯժҪÀ´´¦ÀíÂý²éÑ¯È ......