慕哥9229398
php+mysql百万级数据排序 php+mysql百万级数据分页。因涉及多表多条件联合查询。谁能帮忙优化下面的查询语句。 if(empty($wheresql)){ $wheresql="where aid>=(SELECT aid FROM `tj_logs` LIMIT $sqlfirst,1) limit $shownu";}else{ $wheresql.=" and aid>=(SELECT aid FROM `tj_logs` LIMIT $sqlfirst,1) limit $shownu";} $query=mysql_query("SELECT DISTINCT A.*,B.url,C.username FROM `tj_logs` A LEFT JOIN `tj_domain` B ON A.wid=B.wid LEFT JOIN `tj_members` C ON A.uid=C.uid $wheresql");----