确实是这样的,应该加 volatile,多谢!
select count() from a inner join (select distinct a_id from b where b.flag in (123)) b on a.id = b.a_id 另外 b.flag 加索引?
select count() from a where a. id in (select distinct a_id from b where b.flag in (123))