Re: The 7 seconds query
Sorry, solved it myself now ;-) (unless you could get it under 0.02s?)
select SQL_NO_CACHE a.uname, a.age, a.country, a.region, a.area, a.lastvisit, DATE_FORMAT(DATE_SUB(a.lastactive, INTERVAL 1 HOUR),'%d/%m/%Y') as wann, DATE_FORMAT(DATE_SUB(a.lastedit, INTERVAL 1 HOUR),'%d/%m/%Y') as wannEdit, a.regdate, a.picture, a.paid, a.mobile, p.cryptedname
from fb_users as a LEFT OUTER JOIN fb_pictures as p ON a.uid=p.uid and p.mainpic=1 where a.approved='y' and a.country=70
It must be a left outer join and the mainpic must be joined to, otherwise users without pictures won't show up.
Subject
Views
Written By
Posted
3394
March 24, 2008 05:50AM
Re: The 7 seconds query
2331
March 24, 2008 06:20AM
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.