SELECT
count(DISTINCT ( `biz_object_id` )) count,
t1.creator_p_user_id
FROM
`biz_remark` t1
WHERE t1.`create_time` >= '2020-01-01'
AND t1.`create_time` <= '2022-10-05'
AND t1.biz_type_enum = 3
AND t1.type = 2
GROUP BY t1.creator_p_user_id
order by count desc
有110w条记录, 查询要600毫秒, 期望优化到100毫秒以内。
表结构如下