MySQL Forums
Forum List  »  Newbie

Faster SQL - newbie needs help
Posted by: Morgan Gustafsson
Date: August 17, 2010 11:43AM


I'm a newbie at SQL and hence need your help optimizing the following query.

FROM jos_zoo_item as a
JOIN(SELECT b.item_id FROM jos_zoo_search_index as b WHERE b.element_id = '688d9a68-5ce2-4c53-b226-a053499ef634' AND b.value LIKE '%Stockholms län%') as b ON = b.item_id
JOIN(SELECT c.item_id FROM jos_zoo_search_index as c WHERE c.element_id = 'b018bdde-dc6e-401a-9619-7c0edfb490a7' AND c.value LIKE '%Data och IT%') as c ON = c.item_id
JOIN(SELECT d.item_id FROM jos_zoo_search_index as d WHERE d.value LIKE '%Britny%') as d ON = d.item_id

As you see I want some results from jos_zoo_item but only items which have some values in jos_zoo_search_index.

Any tips in how I can optimize this query would be very much appreciated.



Options: ReplyQuote

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.