使用MySQL提供的explain命令即可实现,explain的具体使用请移步至官网: http://dev.mysql.com/doc/refman/5.5/en/explain-output.html