MySQL Forums
Forum List  »  Optimizer & Parser

Re: Optimize subquery, replace IN() with JOIN
Posted by: Peter Brawley
Date: November 15, 2016 03:34PM

Yikes, who in the world wrote that unnecessarily baroque query?

SELECT a.id, a.title, a.alias 
FROM content             AS a
JOIN category_content_se AS b ON a.id = b.content_id
WHERE a.id=11430 AND a.content_typ = 'actual' 
ORDER BY a.date_add DESC LIMIT 10 ;

If this doesn't return the desired results, please post Show Create table for the two tables plus enough Insert statements for them to demonstrate the problem.

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Optimize subquery, replace IN() with JOIN
886
November 15, 2016 03:34PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.