VCÖÐÓÃADO²Ù×÷MySqlÊý¾Ý¿âÖÐÎÄÎÊÌâ
ÎҵijÌÐòÊÇÓÃADOÀ´Á¬½ÓMysqÊý¾Ý¿âµÄ£¬ÕâÊÇÔÏÈдºÃÓÃÔÚMSSQLÉϵģ¬¸ÄÁËÏÂÁ¬½Ó×Ö·û´®£¬ËùÒÔÒ²¾ÍûÓÐÓÃMySql C++ APIÀ´ÖØÐÂдÁË¡£¸Õ¿ªÊ¼Ê¹ÓÃMySql£¬Óöµ½µÄÎÊÌâ×ÜÊÇÌرðµÄ¶à£¬ÏÖÔÚÓÖÓöµ½Ò»¸öÖ÷Òªsql×Ö·û´®ÖÐÓÐÖÐÎľͱ¨´íµÄÎÊÌ⣬ûÓÐÖÐÎÄÒ»ÇÐÕý³££¬ÕûÕûŪÁËÒ»¸öÉÏÎ磬ÔÚÍøÉÏÒ²ÕÒÁ˺ܶà×ÊÁÏ£¬·¢ÏÖÍøÉϺܶණÎ÷ȷʵÊÇÔÚÃÉÈË£¬°´ËûÃǵķ½·¨À´½á¹û¶¼ÊÇÒ»ÑùµÄ£¬»¹ÊÇ´íÎó¡£
ÏÖÔÚÖÕÓÚ°ÑÎÊÌâ¸ã¶¨ÁË£¬¹²ÏíÏÂ×Ô¼ºµÄѧϰ¾Ñé°É¡£
ÓÃADOÁ¬½ÓMySqlÊý¾Ý¿âÒªÏë±ÜÃâÖÐÎÄÂÒÂëµÈÎÊÌ⣬Ê×ÏÈÒª±£Ö¤Êý¾ÝÑ¡ÓõıàÂë¸ñʽΪGBK(ÕâÊÇÐí¶àÇ°±²Ãǽ¨ÒéµÄ£¬Õâ¸ö×Ö·û¼¯Ö§³ÖµÄ±È½Ï¶à)£¬¶øÇÒÔÚMySqlÖл¹¿ÉÒÔÉèÖñíµÄ£¬×ֶεıàÂë¸ñʽ¡£
Æä´Î£¬ÔÚAD£ÏÁ¬½Ó´úÂëÖÐ×ö±ØÒªµÄÉèÖ㬾ßÌåÉèÖÃÈçÏ£º
try
{
//ÉèÖÃADOʹÓõÄ×Ö·û¼¯
myConn->Execute("set character_set_connection=gbk",NULL,adCmdText);
myConn->Execute("set character_set_results=gbk",NULL,adCmdText);
myConn->Execute("set character_set_client=gbk",NULL,adCmdText);
myConn->Execute(_bstr_t(sqlText),NULL,adCmdText);
}
catch (_com_error e)
{
msg = e.ErrorMessage();
}
Á½·½Ã涼±£Ö¤ÁËÒÔºóÎÊÌâÓ¦¸Ã¾Í¿ÉÒԸ㶨ÁË£¬²»¹ýÎÒÏë²¢²»Ò»¶¨Ò»¶¨ÒªÊ¹Óãǣ£ˣ¬Äܱ£Ö¤Á½±ßµÄ±àÂë¸ñʽһÖÂÓ¦¸Ã¾ÍÐС£
Ïà¹ØÎĵµ£º
Ïêϸ½âÊͺÍÀý×Ó¼ûÏÂÁÐÎÄÕ£º
http://www.mysqlperformanceblog.com/2008/09/03/analyze-myisam-vs-innodb/
http://www.penglixun.com/work/database/mysql_show_index_cardinality.html
£¨1£©cardinalityÓ°Ïìmysql optimizer¶ÔË÷ÒýµÄÑ¡È¡
£¨2£©¿ÉÒÔͨ¹ýshow index from table_nameÀ´²é¿´±íµÄË÷ÒýºÍcardinality
£¨3£©in ......
1.±³¾°
֮ǰ´ÓûÓùýhibernate£¬Òò´ËÔÚÍøÉÏËÑÁËÒ»ÏÂhibernate¿ìËÙÈëÃÅ·½ÃæµÄÐÅÏ¢£¬×îºóÎÒ°´ÕÕ¡¶Myeclipse Hibernate ¿ìËÙÈëÃÅ ÖÐÎÄ°æ¡·£¨CSDN£¬°Ù¶ÈÎĿⶼÓУ©Ò»ÎÄ¿ªÊ¼ÁËÎÒµÄhibernateÖ®Âã¨ÎªÏîÄ¿×ö¼¼Êõ×¼±¸£©¡£
ÏÂÃ ......
ÔÚmysqlÖÐÀûÓÃselectÓï¾äµÄÒ»¸öÌØÐԾͿÉÒԺܷ½±ãµØʵÏÖ²éѯ½á¹ûµÄ·ÖÒ³£¬selectÓï¾äµÄÓï·¨£º
SELECT [STRAIGHT_JOIN] [SQL_SMALL_RESULT] [SQL_BIG_RESULT] [HIGH_PRIORITY]
[DISTINCT | DISTINCTROW | ALL]
select_expression,...
[INTO OUTFILE 'file_name'&nb ......
ת×Ô http://www.supidea.com/post/mysql_design_database.aspx
MySQLÊý¾Ý¿âÉè¼ÆÔÔò
MySQL¶ÔÓÚ³ÉΪһ¸ö·Ç³£¿ìËÙµÄÊý¾Ý¿â·þÎñÆ÷ÓÐ×ŵ±Ö®ÎÞÀ¢µÄÃûÉù£¬ËüÒ²·Ç³£ÈÝÒ×ÉèÖúÍʹÓá£Ëæ×ÅËü×÷ΪÍøÕ¾ºó¶ËÊý¾Ý¿âµÃÉùÍûÈÕÔö£¬ÆäЧ¹ûÔÚÈ¥Ä꿪ʼÓÐÃ÷ ÏÔÌá¸ß¡£µ«ÊǺܶàMySQLÓû§¸ü¶àµØÖªµÀÈçºÎ´´½¨Ò»¸öÊý¾Ý¿â²¢±àд¶ÔËüµÄ²éѯ¡£¾ÍÏñ³ÉÇ ......
1¡¢¿ØÖÆÃæ°åÀïµÄÔö¼Óɾ³ý³ÌÐòÄÚ½øÐÐɾ³ý
2¡¢É¾³ýMySQLÎļþ¼ÐϵÄmy.iniÎļþ£¬Èç¹û±¸·ÝºÃ£¬¿ÉÒÔÖ±½Ó½«Îļþ¼ÐÈ«²¿É¾³ý
3¡¢¿ªÊ¼->ÔËÐÐ-> regedit ¿´¿´×¢²á±íÀïÕ⼸¸öµØ·½É¾³ýûÓÐ
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\Eventlog\Application\MySQL Ŀ¼ɾ³ý
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet002\S ......