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)