MySQL execution plan explain and index data structure deduction

mysql tutorialThe column introduces the execution plan explain and index data structure Preparation First build the database table, the MySQL table for demonstration, and the table creation statement: CREATE TABLE `emp` ( `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'primary key', `empno` int(11) DEFAULT NULL COMMENT &#39 ;employee number’, `ename` varchar(255) DEFAULT NULL COMMENT ’employee’s name’, `job` varchar(255) DEFAULT NULL COMMENT ‘job’, `mgr` varchar(255) DEFAULT NULL COMMENT & # 39; manager’s job number & # 39;, `hiredate` date DEFAULT NULL COMMENT & # 39; hire date & # 39;, `sal` double DEFAULT NULL COMMENT ' 39; Salary & # 39;, `comm` double DEFAULT NULL COMMENT & # 39; Allowance & # 39;, `deptno` int(11) DEFAULT NULL COMMENT & # 39; department number & # 39;, PRIMARY KEY (`id`) USING BTREE ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='employee table';CREATE TABLE `dept` ( `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'primary key', `deptno `int(11) DEFAULT NULL COMMENT 'department number', `dname` varchar(255) DEFAULT NULL COMMENT 'department name', `loc` varchar(255) DEFAULT NULL COMMENT ‘Address’, PRIMARY KEY (`id`) USING BTREE ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Department table';CREATE TABLE `salgrade` ( `id` int(11) NOT NULL COMMENT 'primary key', `grade` varchar(255) DEFAULT NULL COMMENT 'grade', `lowsal` varchar(255) DEFAULT NULL COMMENT 'minimum wage',…

Contact Us

Contact us

181-3619-1160

Online consultation: QQ交谈

E-mail: [email protected]

Working hours: Monday to Friday, 9:00-17:30, holidays off

Follow wechat
Scan wechat and follow us

Scan wechat and follow us

Follow Weibo
Back to top
首页
微信
电话
搜索