sql语句优化时没有测试数据,oracle官方提供测试数据
https://dev.mysql.com/doc/employee/en/employees-installation.html
到 https://github.com/datacharmer/test_db下载
安装
unzip test_db-master.zip mysql -u root -p -t < employees.sql mysql -u root -p -t < employees_partitioned.sql 测试安装的数据 mysql -u root -p -t < test_employees_md5.sql mysql> show tables; +----------------------+ | Tables_in_employees | +----------------------+ | current_dept_emp | | departments | | dept_emp | | dept_emp_latest_date | | dept_manager | | employees | | salaries | | titles | +----------------------+ 8 rows in set (0.00 sec)