Mysql Explain Ïê½â
Mysql Explain Ïê½â
ת×ÔITPUBhttp://www.itpub.net/viewthread.php?tid=1034410&extra=page%3D1%26amp%3Bfilter%3Ddigest&page=1
Ò».Óï·¨
explain < table_name >
ÀýÈç: explain select * from t3 where id=3952602;
¶þ.explainÊä³ö½âÊÍ
+----+-------------+-------+-------+-------------------+---------+---------+-------+------+-------+
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
+----+-------------+-------+-------+-------------------+---------+---------+-------+------+-------+
1.id
ÎÒµÄÀí½âÊÇSQLÖ´ÐеÄ˳ÀûµÄ±êʶ,SQL´Ó´óµ½Ð¡µÄÖ´ÐÐ.
ÀýÈç:
mysql> explain select * from (select * from ( select * from t3 where id=3952602) a) b;
+----+-------------+------------+--------+-------------------+---------+---------+------+------+-------+
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
+----+-------------+------------+--------+-------------------+---------+---------+------+------+-------+
| 1 | PRIMARY | <derived2> | system | NULL | NULL | NULL | NULL | 1 | |
| 2 | DERIVED | <derived3> | system | NULL | NULL | NULL | NULL | 1 | |
| 3 | DERIVED | t3 | const | PRIMARY,idx_t3_id | PRIMARY | 4 | | 1 | |
+----+-------------+------------+--------+-------------------+---------+---------+------+------+------
Ïà¹ØÎĵµ£º
Äãд¹ýÒ»ÌõsqlÓï¾äÀ´ÐÞ¸ÄÁ½¸ö±íµÄÊý¾ÝÂð£¿
UPDATE test.table1 t1,test.table2 t2 SET t1.aa='a',t1.bb='b',t2.cc='c',WHERE t1.u_id=t2.u_id AND t1.u_id='1' £»
table1µÄu_idºÍtable2µÄu_idÊÇÖ÷Íâ¼ü¹Øϵ ......
1. ¿ªÊ¼->¿ØÖÆÃæ°å->Ìí¼Ó»òɾ³ý³ÌÐò->жÔØmysql
2. ¼ÙÉè֮ǰmysqlµÄ°²×°Ä¿Â¼ÊÇC:\Program Files\MySQL\MySQL Server 5.1/, ÄÇôÕâ¸öÏÂÃ滹±£ÁôÁËһЩ¶«Î÷£¬´ò¿ªmy.ini
3. ÕÒµ½#Path to the database root£¬ È»ºó°´ÕÕÕâ¸öPathÕÒµ½mysql,ɾµô
4. °ÑC:\Program Files\MySQLҲɾµô
5. ¿ªÊ¼->ÔËÐÐ ÊäÈër ......
ÔÎÄÍøÖ·£ºhttp://knowhow.innovatedigital.com/mysql-monitoring.html
MySQLÊÇ×îÁ÷ÐеĿª·ÅÔ´´úÂë¹ØϵÊý¾Ý¿âϵͳ¡£ÆäÐÔÄܺÍÒ×ÓÃÐÔ£¬Ê¹Æä³ÉΪLAMP¼Ü¹¹µÄÖÐÐÄÖ§ÖùÖ®Ò»¡£
MySQL¼à¿ØÒ»Ö±ÊǹØ×¢MySQLÊý¾Ý¿âÐÔÄܺÍMySQLÊý¾Ý¿âÔËά¹ÜÀí¼¼ÊõÈËÔ±µÄ·Ç³£¸ÐÐËȤ»°Ìâ¡£ÈçºÎÈÃÄúµÄMySQLÊý¾Ý¿â° ......
ºÜ¾ÃûÓÐЩһЩÓÐÓô¦µÄµÄ¶«Î÷ÁË£¡½ñÌì¾Í²»ºúÂÒµÄ䶫Î÷ÁË!дһЩÓÐÓõģ¡µ±È»Ç°ÌáÏÂÊǺܸÐлºÜ¶à¾³£À´ÎÒ²©¿ÍµÄÅóÓÑһϣ¡¶àл´ó¼Ò£¡£¡£¡£¡£¡
½ñÌìдµÄÊǹØÓÚphp»·¾³¼ÜÉèµÄµÚÒ»ÖÖ·½Ê½£¡µ±È»ÎҾͲ»½ØͼÁË£¡´ó¼ÒÖ»Òª°´ÕÕ²Ù×÷¾Í¿ÉÒÔʵÏֵģ¡
Ò»¡¢°²×° PHP £º±¾ÎÄPHP°²×°Â·¾¶È¡ÎªD:\php\php4\(Ϊ±Ü»ìÏý£¬PHP5.1.x°æ±¾°²×°Â·¾ ......
Nginx + PHP + Mysql (php-frm 방식)
글쓴이 :
최고관리자
조회 : 2,884
......