【mybatis解决oracle查询in超过1000条数据】

1、因为代码中前人未考虑in 数据可能大于1000,导致现在系统报错,MPP low前人

直接上sql

复制代码
select * from table a
<where>
	<if test="list != null and list.size > 0">
		and a.name in
		<foreach collection="list" index="index" item="item" open="(" separator="," close=")">
			<if test="(index % 999) == 998">  ) or a.name in (</if> #{item}
		</foreach >
	</if>
</where>
相关推荐
打工的小王37 分钟前
redis(四)搭建哨兵模式:一主二从三哨兵
数据库·redis·缓存
Anarkh_Lee1 小时前
【小白也能实现智能问数智能体】使用开源的universal-db-mcp在coze中实现问数 AskDB智能体
数据库·人工智能·ai·开源·ai编程
橘子131 小时前
MySQL用户管理(十三)
数据库·mysql
Dxy12393102161 小时前
MySQL如何加唯一索引
android·数据库·mysql
我真的是大笨蛋1 小时前
深度解析InnoDB如何保障Buffer与磁盘数据一致性
java·数据库·sql·mysql·性能优化
怣501 小时前
MySQL数据检索入门:从零开始学SELECT查询
数据库·mysql
shengli7221 小时前
机器学习与人工智能
jvm·数据库·python
2301_765703142 小时前
Python迭代器(Iterator)揭秘:for循环背后的故事
jvm·数据库·python
倔强的石头1062 小时前
关键信息基础设施的数据库选型:高可用、全链路安全与平滑替代的技术实践
数据库·安全·金仓数据库
人道领域2 小时前
javaWeb从入门到进阶(SpringBoot事务管理及AOP)
java·数据库·mysql