Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

Mysql Explain Ïê½â

Òý×Ô http://www.itpub.net/thread-1034410-1-1.html
Mysql Explain Ïê½â
Ò».Óï·¨
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ÊÇ´ÓÀïÏòÍâµÄÖ´ÐÐ,¾ÍÊÇ´Óid=3 ÏòÉÏÖ´ÐÐ.
2. se


Ïà¹ØÎĵµ£º

Ò»¸öMYsqlÀà

<?php
class mysql {
 /*+++++++++++++++Êý¾Ý¿â·ÃÎÊÀà++++++++++++++++++++++++++
 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 */
   //=================================================
        //Á¬½ÓÊý¾Ý
 private $Hos ......

linuxÏÂcÓïÑÔÁ¬½ÓmysqlÊý¾Ý¿â

ÔÚFC8ÖÐĬÈÏ°²×°µÄÓÐmysql£¬Ã»ÓеĻ°¿ÉÒԺܷ½±ãµÄ°²×°Ï¡£
ĬÈϵÄmysqlµÄincludeÎļþĿ¼ÔÚ/usr/include/mysql
ĬÈϵÄmysqlµÄlibÎļþ¼ÐÔÚ/usr/lib/mysql
ÕâÁ½¸öĿ¼ÔÚÎÒÃDZàÒëʱºòÐèÒªµ½¡£
ÎҵIJâÊÔÓõÄC´úÂëΪ£º
££include <stdio.h>
#include <stdlib.h>
#include <mysql.h>
#define CONN_HOST ......

Ôõô°Ñpowerdesignerµ¼³öµÄsqlÓÃPHPµ¼ÈëMysQLÊý¾Ý¿â

ÎÒÃÇÖªµÀÓÃpowerdesignerµ¼³öµÄsqlÎļþºó׺Ϊ'.sql'£»ÓÃphpmyadminºÜÈÝÒ×µ¼ÈëMysQLÊý¾Ý¿â£¬µ«ÊÇÓÃPHPÔõôµ¼ÈëÊý¾Ý¿âÄØ?
ÎÒÓÃpowerdesignerÉè¼ÆÒ»¸öÊý¾Ý¿âºóµ¼³ösqlÎļþ£¨Ò»¸öͶƱϵͳ£©Îª'vote.sql'£»
ÎļþÄÚÈÝΪ£¨Ò»Ð©sqlÓï¾äºÍ×¢ÊÍ£©£º
        
/*======================= ......

PHPÁ¬½ÓMYSQLÊý¾Ý¿â

<p>04¼¶ÐÂÉúÃûµ¥</p>
<table border="1" width="80%" cellpadding="0">
<tr>
<td width="10%" align="center">Id</td>
<td width="20%" align="center">Name</td>
<td width="10%" align="center">Age</td>
<td width="10%" align="cent ......

UbuntuÏÂÅäÖÃLAMP£¨Linux+Apache+Mysql+PHP)»·¾³

ÖÕÓڷżÙÁË£¬ÕýÏëÔÚÕâ¸ö¼ÙÆÚÀïѧѧPHP£¬ÓÉÓÚ×Ô¼ºÓõÄÊÇ×ÀÃæ°æµÄUbuntu8.04,ÓÚÊǾÍÏë¼ÜÉèÒ»¸öLAMP»·¾³À´Ñ§PHP£¬Ò²³Ã´Ë»ú»áѧһÏÂPHP·þÎñÆ÷µÄ¼ÜÉè¡£
Ò»¡¢°²×°Ubuntu8.04
ËäȻ˵ÊÇÅäÖÃLAMP»·¾³£¬µ«ÔÚÎÄÕÂÀï²¢²»»á½²ÊöÈçºÎ°²×°Ubuntu8.04,ÒòΪ¹ØÓÚÈçºÎUbuntu8.04ÔÚÍøÉÏÒѾ­ÓкܶàµÄ½Ì³ÌÁË£¬¾ÍËãÊÇÓ²ÅÌ°²×°Ò²ÊÇÒ»¼þºÜ¼òµ¥µÄÊÂÁ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ