Mysql
 sql >> Database >  >> RDS >> Mysql

Aiuto con le prestazioni:SUBQUERY vs JOIN

Prova la seguente query:

SELECT STRAIGHT_JOIN item_id
FROM (
    SELECT DISTINCT search_id
    FROM mtrt_searches_groups
    WHERE client_id = 1
) JOIN mtrt_items_searches USING(search_id)
LIMIT 0,350000