Php+mysql Millions How is the data sorted?
Php+mysql millions data paging. Multiple-table multi-Conditional union queries are involved. Who can help optimize the following query statement.
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 in A.wid=b.wid left join ' Tj_members ' C on A.uid=c.uid $wheresql ");
------Solution--------------------
In a sense, you should take redundant design to redundancy for efficiency, which is called inverse paradigm design
http://www.bkjia.com/PHPjc/820424.html www.bkjia.com true http://www.bkjia.com/PHPjc/820424.html techarticle Php+mysql Millions How is data sorted? php+mysql millions data paging. Multiple-table multi-Conditional union queries are involved. Who can help optimize the following query statement. if (empty ($wheresql)) {$wher ...