Take a look at this gem - it's part of a shopping software
SELECT DISTINCT s0_.id AS id_0, s1_.name AS name_1, s2_.description AS
description_2, s3_.countryname AS countryname_3, s0_.id AS id_4 FROM s_user
s0_
LEFT JOIN s_core_shops s1_ ON s0_.subshopID = s1_.id
LEFT JOIN
s_user_addresses s4_ ON s0_.default_billing_address_id = s4_.id
LEFT JOIN
s_core_countries s3_ ON s4_.country_id = s3_.id
LEFT JOIN s_user_attributes
s5_ ON s0_.id = s5_.userID
LEFT JOIN s_core_customergroups s2_ ON s0_.customergroup = s2_.groupkey ORDER BY
s0_.id DESC LIMIT 20 OFFSET 0;
Five LEFT JOINs to get 20 customers. This query takes on a non-ssd machine about 6 Minutes(!) to run and creates temporary tables about the size of 80 MBs - just to get 20 entries(!). One of the ideas the devs came up: Just throw RAM and SSD at it, Jesus, what happened to optimizing queries?