select `t_members`.id from `t_members`
INNER JOIN t_member_merchant_bind on t_member_merchant_bind.`member_id` = `t_members`.`id`
where `t_member_merchant_bind`.`created_at` <'2023-01-01' and t_member_merchant_bind.ouid>''
LIMIT 10
select `t_members`.id from `t_members`
INNER JOIN t_member_merchant_bind on t_member_merchant_bind.`member_id` = `t_members`.`id`
where `t_member_merchant_bind`.`created_at` <'2023-01-01' and t_member_merchant_bind.ouid>'' and t_members.id>0
LIMIT 10
第一个不走索引,第二个走索引 原因 查出的数据过大,默认不走索引,当where条件声明联表字段时候 如果联表字段设置了索引 这时候相当于强制走索引