MySQL Forums
Forum List  »  Performance

Re: subquery vs. join?
Posted by: hector vass
Date: January 20, 2005 04:41PM

You might be able to phrase an easier question.

create temporary table t
select SQL_BIG_RESULT
login_ip,
count(*) as freq
from log
group by login_ip;

select
speed_type,
sum(freq) as freq
from t a , ip_region b
where a.login_ip between b.start_ip and b.end_ip
group by speed_type;

Options: ReplyQuote


Subject
Views
Written By
Posted
20628
December 03, 2004 02:52AM
7206
December 05, 2004 03:03AM
6022
December 05, 2004 07:52PM
6265
January 20, 2005 03:48AM
5382
January 20, 2005 06:52AM
4743
January 21, 2005 11:43PM
4932
January 21, 2005 11:38PM
Re: subquery vs. join?
3943
January 20, 2005 04:41PM


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.