草庐IT

photocomments

全部标签

Mysql查询Order By太慢

我知道以前有人问过这种问题,但没有一个让我找到解决方案。这是我的查询:SELECTp.photoid,c.comment,p.path,p.smallfile,p.bigfile,c.userid,c.dateposted,u.username,c.likephotoFROMbs_photocommentsc,photosp,useruWHEREc.active=1ANDu.userid=c.useridANDp.photoid=c.photoidANDc.id=(SELECTIDFROMbs_photocommentsWHEREphotoid=p.photoidORDERBYIDDE