Знаете я (доверяй, но проверяй) все же провел эксперимент с IN (и создал метод на IN) - да запрос получился маленький, но скорость выполнения даже на 2 категориях уступает "длинному" UNION, все же кеш mysql на одинаковых запросах работает быстро
(SELECT DISTINCT cd.name AS blog_name,
rd.name AS record_name,
comm.*,
comm.date_added AS date_available,
comm.comment_id AS commentid,
rec.viewed AS record_viewed,
comm.rating AS rating,
c.blog_id,
rec.image,
(SELECT AVG(rating) AS total
FROM roc_comment r1
WHERE r1.record_id = rec.record_id
AND r1.status = '1'
GROUP BY r1.record_id) AS rating_avg,
(SELECT COUNT(*) AS total
FROM roc_comment r2
WHERE r2.record_id = rec.record_id
AND r2.status = '1'
GROUP BY r2.record_id) AS record_comments,
'blogs' AS TYPE
FROM roc_blog c
LEFT JOIN roc_blog_description cd ON (c.blog_id = cd.blog_id)
LEFT JOIN roc_blog_to_store c2s ON (c.blog_id = c2s.blog_id)
LEFT JOIN roc_record_to_blog r2b ON (c.blog_id = r2b.blog_id)
LEFT JOIN roc_record rec ON (rec.record_id = r2b.record_id)
LEFT JOIN roc_record_to_store r2s ON (r2s.record_id = rec.record_id)
LEFT JOIN roc_record_description rd ON (rec.record_id = rd.record_id)
LEFT JOIN roc_comment comm ON (rec.record_id = comm.record_id)
WHERE cd.language_id = '1'
AND rd.language_id = '1'
AND c2s.store_id = '0'
AND r2s.store_id = '0'
AND c.status = '1'
AND rec.status = '1'
AND comm.status = '1'
AND c.blog_id IN (1, 2, 3)
AND c.customer_group_id = '1')
UNION
(SELECT DISTINCT cd.name AS blog_name,
rd.name AS record_name,
comm.*,
comm.date_added AS date_available,
comm.review_id AS commentid,
rec.viewed AS record_viewed,
comm.rating AS rating,
c.category_id AS blog_id,
rec.image,
(SELECT AVG(rating) AS total
FROM roc_review r1
WHERE r1.product_id = rec.product_id
AND r1.status = '1'
GROUP BY r1.product_id) AS rating_avg,
(SELECT COUNT(*) AS total
FROM roc_review r2
WHERE r2.product_id = rec.product_id
AND r2.status = '1'
GROUP BY r2.product_id) AS record_comments,
'categories' AS TYPE
FROM roc_category c
LEFT JOIN roc_category_description cd ON (c.category_id = cd.category_id)
LEFT JOIN roc_category_to_store c2s ON (c.category_id = c2s.category_id)
LEFT JOIN roc_product_to_category r2b ON (c.category_id = r2b.category_id)
LEFT JOIN roc_product rec ON (rec.product_id = r2b.product_id)
LEFT JOIN roc_product_to_store r2s ON (r2s.product_id = rec.product_id)
LEFT JOIN roc_product_description rd ON (rec.product_id = rd.product_id)
LEFT JOIN roc_review comm ON (rec.product_id = comm.product_id)
WHERE cd.language_id = '1'
AND rd.language_id = '1'
AND c2s.store_id = '0'
AND r2s.store_id = '0'
AND c.status = '1'
AND rec.status = '1'
AND comm.status = '1'
AND c.category_id IN (59 , 20, 32, 35))
ORDER BY date_available DESC LIMIT 0,4
Красивее? Да, но работает медленнее, чем на UNION