MySQL Forums
Forum List  »  Performance

Re: COUNT with GROUP BY, JOIN and SUBQUERY very slow
Posted by: Øystein Grøvlen
Date: March 03, 2015 01:27AM


AFAICT, you can use an IN-subquery for this. Something like:

SELECT id, nome FROM radcliente t WHERE IN
(SELECT cliente_id FROM radacct WHERE nasipaddress='...') LIMIT 10;

And make sure to use MySQL 5.6. It has better performance of IN-subqueries than earlier versions.

Hope this helps,

Øystein Grøvlen,
Senior Principal Software Engineer,
MySQL Group, Oracle,
Trondheim, Norway

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.