当前使用版本(必填,否则不予处理)
mybatis-plus 3.3.0
该问题是如何引起的?(确定最新版也有问题再提!!!)
数据库MySQL
分页查询时使用select count(1) from ***统计总数, 表超过百万条数据后, 统计用时约4秒, 使得分页效率很低,
自己用select sum(1) from *** 统计总数, 用时约0.5秒
重现步骤(如果有就写完整)
无
报错信息
无
Comment From: qmdx
文档 https://baomidou.com/guide/page.html 你可以自己查询结果,然后 setCount 这样 list 查询会以你的 count 为准分页
Comment From: chenbihao
文档 baomidou.com/guide/page.html 你可以自己查询结果,然后 setCount 这样 list 查询会以你的 count 为准分页
请教一下怎么setCount 呢,找不到示例代码TT