This is my query, its running terribly slow. How can I improve the performance? Maybe using a join instead sunselects?
select
sfoa.firstname,
sfoa.lastname,
sfo.increment_id
from sales_flat_order_address sfoa
join sales_flat_order sfo
on sfoa.parent_id = sfo.entity_id
where parent_id
in
(
SELECT
order_id
FROM
(
SELECT
sfoi.order_id,
GROUP_CONCAT(sfoi.sku SEPARATOR ', ') AS skus
FROM sales_flat_order_item sfoi
GROUP BY sfoi.order_id) t
WHERE t.skus LIKE '%whatever%'
AND t.skus RLIKE '[0-9]'
);
Thanks for helping!