#18 select c_name, c_custkey, o_orderkey, o_orderdate, o_totalprice, sum(l_quantity) from customer, orders, lineitem where o_orderkey in ( select l_orderkey from lineitem group by l_orderkey having sum(l_quantity) > 313 ) and c_custkey = o_custkey and o_orderkey = l_orderkey group by c_name, c_custkey, o_orderkey, o_orderdate, o_totalprice order by o_totalprice desc, o_orderdate LIMIT 100; 40日(MySQL 5.5) → 6.8秒(MySQL 5.6) http://oysteing.blogspot.jp/2012/07/from-months-to-seconds-with-subquery.html
SELECT col1, ... FROM t1 ... ORDER BY name LIMIT 10; 40秒(MySQL 5.5) → 10秒(MySQL 5.6) http://didrikdidrik.blogspot.jp/2011/04/optimizing-mysql-filesort-with-small.html
quotes (id int unsigned auto_increment primary key , author varchar(64) , quote varchar(4000) , source varchar(64) , fulltext(quote) ) engine=innodb; SELECT author AS "Apple" FROM quotes WHERE match(quote) against ('apple' in natural language mode);
TABLE t FOR EXPORT; cp t.ibd t.cfg /work/ UNLOCK TABLES; CREATE TABLE t (...) ENGINE INNODB; ALTER TABLE t DISCARD TABLESPACE; cp /work/t.ibd /work/t.cfg ./ ALTER TABLE t IMPORT TABLESPACE;