[MySQLÓÅ»¯] ÈçºÎÁ˽âSQLµÄÖ´ÐÐÆµÂÊ
[MySQLÓÅ»¯] -- ÈçºÎÁ˽âSQLµÄÖ´ÐÐÆµÂÊ
ʱ¼ä:2010-2-28À´Ô´:HaCMS¿ªÔ´ÉçÇø ×÷Õß:chuxu
MySQL ¿Í»§¶ËÁ¬½Ó³É¹¦ºó£¬Í¨¹ý show [session|global]status ÃüÁî ¿ÉÒÔÌṩ·þÎñÆ÷״̬ÐÅÏ¢£¬Ò²¿ÉÒÔÔÚ²Ù×÷ϵͳÉÏʹÓà mysqladmin extended-status ÃüÁî»ñµÃÕâЩÏûÏ¢¡£ show [session|global] status ¿ÉÒÔ¸ù¾ÝÐèÒª¼ÓÉϲÎÊý“ session ”»òÕß“ global ”À´ÏÔʾ session ...
MySQL ¿Í»§¶ËÁ¬½Ó³É¹¦ºó£¬Í¨¹ý show [session|global]status ÃüÁî ¿ÉÒÔÌṩ·þÎñÆ÷״̬ÐÅÏ¢£¬Ò²¿ÉÒÔÔÚ²Ù×÷ϵͳÉÏʹÓà mysqladmin extended-status ÃüÁî»ñµÃÕâЩÏûÏ¢¡£
show [session|global] status ¿ÉÒÔ¸ù¾ÝÐèÒª¼ÓÉϲÎÊý“ session ”»òÕß“ global ”À´ÏÔʾ session ¼¶£¨µ±Ç°Á¬½Ó£©µÄͳ¼Æ½á¹ûºÍ global ¼¶£¨×ÔÊý¾Ý¿âÉÏ´ÎÆô¶¯ÖÁ½ñ£©µÄͳ¼Æ½á¹û¡£Èç¹û²»Ð´£¬Ä¬ÈÏʹÓòÎÊýÊÇ“ session ”¡£
Com_xxx ±íʾÿ¸ö xxx Óï¾äÖ´ÐеĴÎÊý£¬ÎÒÃÇͨ³£±È½Ï¹ØÐĵÄÊÇÒÔϼ¸¸öͳ¼Æ²ÎÊý £º
Com_delete £ºÖ´ÐÐ DELETE ²Ù×÷µÄ´ÎÊý¡£
ÖªµÀÁËÕâЩÐÅÏ¢¾Í·½±ãÎÒÃÇÈ·¶¨ÎÒÃǵ½µ×ÐèҪʲôÑùµÄ´æ´¢ÒýÇæÁË£¬Ò»°ãÀ´Ëµupdate½Ï¶àµÄʱºò Innodb ÒýÇæÐ§ÂÊ»áÉÔ΢¸ßһЩ£¡
ÉÏÃæÕâЩ²ÎÊý¶ÔÓÚËùÓд洢ÒýÇæµÄ±í²Ù×÷¶¼»á½øÐÐÀۼơ£ÏÂÃæÕ⼸¸ö²ÎÊýÖ»ÊÇÕë¶Ô InnoDB ´æ´¢ÒýÇæµÄ£¬ÀÛ ¼ÓµÄËã·¨Ò²ÂÔÓв»Í¬£º
Innodb_rows_deleted £ºÖ´ÐÐ DELETE ²Ù×÷ɾ³ýµÄÐÐÊý¡£
ͨ¹ýÒÔÉϼ¸¸ö²ÎÊý£¬¿ÉÒÔºÜÈÝÒ×µØÁ˽⵱ǰÊý¾Ý¿âµÄÓ¦ÓÃÊÇÒÔ²åÈë¸üÐÂΪÖ÷»¹ÊÇÒÔ²éѯ²Ù×÷ΪÖ÷£¬ÒÔ¼°¸÷ÖÖÀàÐ굀 SQL ´óÖµÄÖ´ÐбÈÀýÊǶàÉÙ¡£¶ÔÓÚ¸üвÙ×÷µÄ¼ÆÊý£¬ÊǶÔÖ´ÐдÎÊýµÄ¼ÆÊý£¬²»ÂÛÌá½»»¹Êǻعö¶¼»á½øÐÐÀÛ¼Ó¡£
¶ÔÓÚÊÂÎñÐ͵ÄÓ¦Óã¬Í¨¹ý Com_commit ºÍ Com_rollback ¿É ÒÔÁ˽âÊÂÎñÌá½»ºÍ»Ø¹öµÄÇé¿ö£¬¶ÔÓڻعö²Ù×÷·Ç³£Æµ·±µÄÊý¾Ý¿â£¬¿ÉÄÜÒâζ×ÅÓ¦Óñàд´æÔÚÎÊÌâ¡£
´ËÍ⣬ÒÔϼ¸¸ö²ÎÊý±ãÓÚÎÒÃÇÁ˽âÊý¾Ý¿âµÄ»ù±¾Çé¿ö£º
Slow_queries £º Âý²éѯµÄ´ÎÊý¡£
http://blog.chinaunix.net/u3/93470/showart_2001435.html
Ïà¹ØÎĵµ£º
<!--MySql Çý¶¯³ÌÐò eg. mysql-connector-java-5.0.4-bin.jar-->
<property name="dialect">org.hibernate.dialect.MySQLDialect</property>
<property name="connection.driver_class">com.mysql.jdbc.Driver</property>
<!-- JDBC URL -->
......
×î½üÕÛÌÚGeoServerÓëMysqlµÄÁ¬½Ó£¬ÊÔÁ˲»ÉÙʱ¼ä£¬³öÏÖÁ˼¸¸öÎÊÌâ
1 ·¢²¼µÄ»ùÓÚmysqlÊý¾Ý¿âLayer£¬ÔÚÔ¤ÀÀʱʧ°Ü
Ïà¹Ø°æ±¾ÈçÏ£º
Gerserver 2.0.1
Mysql 5.5.1
mysql-connector-java-5.1.5.jar
gt-mysql-2.6.0.jar
ºó³¢ÊÔÌæ»»MysqlÊý¾Ý¿â°æ±¾Îª5.0 ......
mysql ±àÒë°²×°Óë±àÒë²ÎÊý
Ìí¼Ómysql×éºÍmysqlÓû§
[root@centos mysql]# groupadd mysql
[root@centos mysql]# useradd -g mysql mysql
±àÒëÓë°²×°
tar -zxvf mysql-5.1.35.tar.gz
./configure \
--prefix=/usr/local/mysql \
--localstatedir=/data/mysql/data \ m ......
[MySQLÓÅ»¯] -- ÈçºÎ¶¨Î»Ð§Âʽϵ͵ÄSQL
ʱ¼ä:2010-2-28À´Ô´:HaCMS¿ªÔ´ÉçÇø ×÷Õß:zhenpao
Ò»°ãͨ¹ýÒÔÏÂÁ½ÖÖ·½Ê½¶¨Î»Ö´ÐÐЧÂÊ½ÏµÍµÄ SQL Óï¾ä¡£ Âý²éѯÈÕÖ¾ÔÚ²éѯ½áÊøÒÔºó²Å¼Í¼£¬ËùÒÔÔÚÓ¦Ó÷´Ó³Ö´ÐÐЧÂʳöÏÖÎÊÌâµÄʱºò²éѯÂý²éѯÈÕÖ¾²¢²»Äܶ¨Î»ÎÊÌ⣬¿ÉÒÔʹÓà show processlist ÃüÁî²é¿´µ±Ç° MySQL ÔÚ½øÐеÄỊ̈߳¬° ......
תÖÁhttp://mbtk.blog.sohu.com/150003773.html £¬²¢²¹³äһЩÏà¹ØÖªÊ¶¡£
DBCC ErrorLog £ºÈç¹ûºÜÉÙÖØÆðmssqlserver·þÎñ£¬ÄÇô·þÎñÆ÷µÄÈÕÖ¾»áÔö³¤µÃºÜ¿ì£¬¶øÇÒ´ò¿ªºÍ²é¿´ÈÕÖ¾µÄËÙ¶ÈÒ²»áºÜÂý¡£Ê¹ÓÃÕâ¸öÃüÁ¿ÉÒԽضϵ±Ç°µÄ·þÎñÆ÷ÈÕÖ¾£¬Ö÷ÒªÊÇÉú³ÉÒ»¸öеÄÈÕÖ¾¡£¿ÉÒÔ¿¼ÂÇÉèÖÃÒ»¸öµ÷¶ÈÈÎÎñ£¬Ã¿ÖÜÖ´ÐÐÕâ¸öÃüÁî×Ô¶¯½Ø¶Ï·þÎ ......