MySQL Forums
Forum List  »  Optimizer & Parser

Jabar Query
Posted by: zain alam
Date: July 16, 2008 12:01AM

Can anyone help me with this query, it is giving me a hard time.
this query takes 1.1 min to execute on 3000 records.
do post it you have any suggestions

SELECT DISTINCT vehicle_id FROM `vehicle_log`

WHERE session_id IN (SELECT session_id FROM `vehicle_log` WHERE vehicle_id = 124 ) AND vehicle_id != 124

GROUP BY vehicle_id

ORDER BY COUNT(vehicle_id) DESC

LIMIT 0, 10

Regards,
Zain Alam

Options: ReplyQuote


Subject
Views
Written By
Posted
Jabar Query
3000
July 16, 2008 12:01AM


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.