易截截图软件、单文件、免安装、纯绿色、仅160KB

Mysql Explain 详解[强烈推荐]

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. select_type
就是select类型,可以有以下几种
(1) SIMPL


相关文档:

mysqldump进行Mysql 备份


mysql数据库导出要用到MySQL的mysqldump工具,基本用法是: 
 
shell> mysqldump [OPTIONS] database [tables]
 
如果你不给定任何表,整个数据库将被导出。
通过执行mysqldump --help,你能得到你mysqldump的版本支持的选项表。 
注意,如果你运行mysqldump没有--quick或--opt选项,mysq ......

MySql免安装版的相关配置

   1)、去sun的官网下载一个mysql的压缩包,我下载的是mysql-noinstall-5.5.0-m2-win32.zip。
   2)、把上面下载的压缩包解压到:D:\Program Files\mysql下面。
   3)、在 D:\Program Files\mysql\ 中找 my-large.ini 把它复制成 my.ini。
   4)、在 my.ini 中找 [mysqld] ,添 ......

创建oracle访问mysql的数据链路步骤

(1)登陆到mysql
C:\Documents and Settings\Administrator>mysql -h localhost -u root -p
Enter password: *****
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 69
Server version: 5.0.51a-community-nt MySQL Community Edition (GPL)
Type 'help;' or '\h' fo ......

PHP中的MYSQL常用函数总结

PHP中的MYSQL常用函数总结
1、mysql_connect()-建立数据库连接
格式:
    resource mysql_connect([string hostname [:port] [:/path/to/socket] [, string username] [, string password]])
例:
    $conn = @mysql_connect("localhost", "username", "password") or dir( ......

MySQL衍生版 MySQL/Galera 0.7.1 发布


Galera 是一套在 MySQL InnoDB 上面实现 Multi-master 且 synchronous replication 的系統。
该版本修复了9个bug,主要是处理 DDL 和 DML 的并发问题,另外基准MySQL版本升级到 5.1.41 。
下载地址: http://www.codership.com/en/downloads/galera
......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号