更新时间:2022-09-22 16:16:45
select count(*) from table_name where primary_key >=0
select count(*) from table_name where key_col >=0
show table status
[MySQL FAQ]系列 -- 为何innodb表select count(*)很慢
[MySQL FAQ]系列 — 为什么InnoDB表要建议用自增列做主键