mysql min函数优化
select min(id) from table where noindexfield = 'abc'
当where 条件未有索引,求的最小字段 又是主键的时候,可采用
select id from table where noindexfield = 'abc' limit 1
优化方案出自 高性能mysql
mysql min函数优化
select min(id) from table where noindexfield = 'abc'
当where 条件未有索引,求的最小字段 又是主键的时候,可采用
select id from table where noindexfield = 'abc' limit 1
优化方案出自 高性能mysql