mybatisplus和pagehelper优缺点
来源:动视网
责编:小OO
时间:2023-09-24 09:30:39
mybatisplus和pagehelper优缺点
pagehelper不好优化。pagehelper数据量达到一定数量时limit分页时会特别慢,count(*)把数据库卡死pagehelper用selectAll时会帮你做个select count(0)上千万数据时10分钟回不来。数据量太大时,做组件将数量查出。workround id count计数存在某个地方,id逆序查反向查分页,查最大的先不管,上百万后分页没必要那么准,数据容忍。
导读pagehelper不好优化。pagehelper数据量达到一定数量时limit分页时会特别慢,count(*)把数据库卡死pagehelper用selectAll时会帮你做个select count(0)上千万数据时10分钟回不来。数据量太大时,做组件将数量查出。workround id count计数存在某个地方,id逆序查反向查分页,查最大的先不管,上百万后分页没必要那么准,数据容忍。

pagehelper不好优化
pagehelper数据量达到一定数量时limit分页时会特别慢,count(*)把数据库卡死pagehelper用selectAll时会帮你做个select count(0)上千万数据时10分钟回不来
数据量太大时,做组件将数量查出。workround id count计数存在某个地方,id逆序查反向查分页,查最大的先不管,上百万后分页没必要那么准,数据容忍。
mybatisplus和pagehelper优缺点
pagehelper不好优化。pagehelper数据量达到一定数量时limit分页时会特别慢,count(*)把数据库卡死pagehelper用selectAll时会帮你做个select count(0)上千万数据时10分钟回不来。数据量太大时,做组件将数量查出。workround id count计数存在某个地方,id逆序查反向查分页,查最大的先不管,上百万后分页没必要那么准,数据容忍。