Summary: An alternate approach, offered in response to our
original post, provides excellent improvements
for smaller databases, but clustered indexes offer better
performance as database size increases. (This posting is by
Jay Pipes suggested an alternate approach to improving MySQL
performance of Query 17 on a TPC-H-like database.
- Add the index (l_partkey, l_quantity) to the lineitem
- Re-write the query as: