MySQL Forums
Forum List  »  Optimizer & Parser

Re: mySQL performance problem on subqueries
Posted by: Peter Brawley
Date: May 15, 2006 12:31PM

Did you try decorrelating the subquery, something like (untested) ...

SELECT t1.*, COUNT(t2.c001)
FROM mytable t1
INNER JOIN mytable t2 ON t2.c003 BETWEEN t1.c003 AND t1.c004
WHERE t1.c005 = 121
GROUP BY t1.c003;

PB

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: mySQL performance problem on subqueries
1790
May 15, 2006 12:31PM


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.