-- 通常写法,查出条件下的数据数量count SELECT count(*) FROM table WHERE a = 1 AND b = 2
-- 使用Limit1 , 避免资源过度扫描 SELECT 1 FROM table WHERE a = 1 AND b = 2 LIMIT 1