| 
 | 
 
 
发表于 2011-3-8 08:40:42
|
显示全部楼层
 
 
 
原帖由 狒狒 于 2011-3-7 19:24 发表   
$from = intval($_GET['id']?:rand(1,7900000)); 
$d = $jsql->query("select id,title from $tb  where id > $from limit 10"); 
        while($r = $d->fetch()){ 
                $title_tmp = $r->title; 
                $id = $r->id; 
                $left .= ' ...   
这个还是依赖的主键,不太会产生效率问题的,会产生效率问题的大多是 
 
select *fields from table where user_id=123 and is_active=1 order by updated_at desc limit 1000,20 
 
这种 |   
 
 
 
 |