¿ªÆô MySQL query cache£¬¼Ó¿ìÊý¾Ý¿â¶ÁÈ¡ËÙ¶È
ÔÚÍøÕ¾½¨Éè»òÕßÔËÓªÖУ¬Èç¹û MySQL server ÊǷdz£·±Ã¦£¬¿ÉÒÔ¿ªÆô query cache ÒÔ¼ÓËÙ»ØӦʱ¼ä£¬¿ªÆô·½·¨¿ÉÒÔÔÚ my.cnf 裡Ãæ¼ÓÈëÒÔÏÂÏîÄ¿: (Redhat ÏÂÃæÊÇ /etc/my.cnf£»Debian ÊÇÔÚ etc/mysql
/my.cnf).
query_cache_size = 64M
query_cache_type = 1
query_cache_limit = 1048576
ÒÔÉÏÓï·¨µÄÉ趨ÀïÃ棬query_cache_size ÊÇ·ÖÅä 256MB ¼ÇÒäÌå¿Õ¼ä¸ø query
cache£»query_cache_type É趨³É 1£¬ÊǸøËùÓеIJéѯ×ö cache£»query_cache_limit
ÊÇÖ¸¶¨¸ö±ðµÄ²éѯÓï¾ä 1KB µÄ¼ÇÒäÌå¿Õ¼ä¡£
ÕâЩÊýÖµ¿É¸ù¾Ý×Ô¼ºµÄÐèÒª×÷³ö¸ü¸Ä£¬É趨¼°´æµµºó£¬ÖØÐÂÆô¶¯ MySQL ¼´¿É¡£
Query Cache ÔÚÌá¸ßÊý¾Ý¿âÐÔÄÜ·½Ãæ¾ßÓзdz£ÖØÒªµÄ×÷Óá£
ÆäÉ趨Ҳ·Ç³£¼òµ¥£¬½öÐèÒªÔÚÅäÖÃÎļþдÈëÁ½ÐУº query_cache_type ºÍ query_cache _size£¬¶øÇÒ MySQL µÄ query cache ·Ç³£¿ì£¡¶øÇÒÒ»µ©ÃüÖУ¬¾ÍÖ±½Ó·¢Ë͸ø¿Í»§¶Ë£¬½ÚÔ¼´óÁ¿µÄ CPU ʱ¼ä¡£
µ±È»£¬·Ç SELECT Óï¾ä¶Ô»º³åÊÇÓÐÓ°ÏìµÄ£¬ËüÃÇ¿ÉÄÜʹ»º³åÖеÄÊý¾Ý¹ýÆÚ¡£Ò»¸ö UPDATE
Óï¾äÒýÆðµÄ²¿·Ö±íÐ޸ģ¬½«µ¼Ö¶ԸñíËùÓеĻº³åÊý¾ÝʧЧ£¬ÕâÊÇ MySQL ΪÁËƽºâÐÔÄܶøûÓвÉÈ¡µÄ´ëÊ©¡£ÒòΪ£¬Èç¹ûÿ´Î UPDATE
ÐèÒª¼ì²éÐ޸ĵÄÊý¾Ý£¬È»ºó³·³ö²¿·Ö»º³å½«µ¼Ö´úÂëµÄ¸´ÔÓ¶ÈÔö¼Ó¡£
query_cache_type 0 ´ú±í²»Ê¹Óûº³å£¬ 1 ´ú±íʹÓûº³å£¬2 ´ú±í¸ù¾ÝÐèҪʹÓá£
ÆäʵMySQLÖÐÓÐÄÚ´æ±íÁË, ÍêÈ«¿ÉÒÔ²»ÓÃÕâ¸ö¹¦ÄÜ. ¶ÔÓÚQuery Cache, MySQLÌṩÁËquery_cache_type±äÁ¿À´¿ØÖÆ·¢Ë͵½Êý¾Ý¿âµÄSQLÊÇ·ñ½øÐÐCache, ÓÐÈý¸öÖµ:
0, ¶ÔSQLÓï¾ä²»½øÐÐCache.
1, ¶ÔÓÚÓÐSQL_NO_CACHEÌáʾµÄSQL²»½øÐÐCache.
2, ½ö¶ÔÓÚÓÐSQL_CACHE½øʾµÄSQL½øÐÐCache.
ת×Ô£º¿ªÆô MySQL query cache£¬¼Ó¿ìÊý¾Ý¿â¶ÁÈ¡ËÙ¶È
»¹ÓÐһƪ×ÊÁÏ¿ÉÒÔ¸¨Öúѧϰ http://hi.baidu.com/xytel/blog/item/d74d4c1204e4d959f919b827.html
Ïà¹ØÎĵµ£º
Îȹʶø֪У¬×î½üÓÖÓõ½ÁË£¬²Ý²ÝÄÃÀ´ÎÂϰһϣº×ª×Ô http://www.bccn.net/Article/sjk/mysql/jc/200601/3411.html
MySQL¹ÜÀíÔ±Ó¦¸ÃÖªµÀÈçºÎÉèÖÃMySQLÓû§Õ˺ţ¬Ö¸³öÄĸöÓû§¿ÉÒÔÁ¬½Ó·þÎñÆ÷£¬´ÓÄÄÀïÁ¬½Ó£¬Á¬½ÓºóÄÜ×öʲô¡£MySQL
3.22.11¿ªÊ¼ÒýÈëÁ½ÌõÓï¾äʹµÃÕâÏ×÷¸üÈÝÒ××ö£ºGRANTÓï¾ä´´½¨MySQLÓû§²¢Ö¸¶¨ÆäȨÏÞ£¬¶øREV ......
MySQLÖÐʹÓô洢¹ý³Ì
ʹÓÃCallableStatementsÖ´Ðд洢¹ý³Ì
mysql°æ±¾:5.0
Connector/JµÄ°æ±¾:3.1.1ÒÔÉÏ(java.sql.CallableStatement½Ó¿ÚÒÑÍêȫʵÏÖ,³ýÁËgetParameterMetaData()·½·¨)
MySQLµÄ´æ´¢¹ý³ÌÓï·¨ÔÚMySQL²Î¿¼ÊÖ²áµÄ"´æ´¢¹ý³ÌºÍº¯Êý"Ò»ÕÂ.
http://www.mysql.com/doc/en/Stored_Procedures.html
ÏÂÃæÊÇÒ»¸ ......
À´Ô´£ºhttp://www.sudone.com/linux/mysql_debug.html
×÷ÕߣºAyou
ÎÒÒ»Ö±ÊÇʹÓÃmysqlÕâ¸öÊý¾Ý¿âÈí¼þ£¬Ëü¹¤×÷±È½ÏÎȶ¨£¬Ð§ÂÊÒ²ºÜ¸ß¡£ÔÚÓöµ½ÑÏÖØÐÔÄÜÎÊÌâʱ£¬Ò»°ã¶¼ÓÐÕâô¼¸ÖÖ¿ÉÄÜ£º
1¡¢Ë÷ÒýûÓн¨ºÃ£»
2¡¢sqlд·¨¹ýÓÚ¸´ÔÓ£»
3¡¢ÅäÖôíÎó£»
4¡¢»úÆ÷ʵÔÚ¸ººÉ²»ÁË£»
1¡¢Ë÷ÒýûÓн¨ºÃ
Èç¹û¿´µ½mysqlÏûºÄµÄcpuºÜ´ó£¬¿ÉÒÔÓ ......
Á¬½Ó´úÂë1Ö±½ÓÊäÈë
<%
Dim my_conn, sql,rs
Set my_conn = createobject("ADODB.Connection")
my_conn.open = "DRIVER={MySQL ODBC 3.51 Driver};"_
& "SERVER=localhost;"_ '·þÎñÆ÷Ãû
& "DATABASE=mybase;"_ 'Êý¾Ý¿âÃû
& "UID=root;PWD=111; OPTION=35;" 'Óû§ÃûºÍÃÜÂë
Set rs = Server.Crea ......