对于InnoDB存储,最好是计算记录总数
使用mysql_num_rows上
mysql_num_rows
select * from tbl where pk = 1
或者
获取数组并从中检索"total"值
select count(*) as total from tbl where pk = 1
?
mysql performance
mysql ×1
performance ×1