【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>
相关推荐
hshpy6 分钟前
setting up Activiti BPMN Workflow Engine with Spring Boot
数据库·spring boot·后端
李少兄1 小时前
解决MyBatis参数绑定中参数名不一致导致的错误问题
mybatis
文牧之1 小时前
Oracle 审计参数:AUDIT_TRAIL 和 AUDIT_SYS_OPERATIONS
运维·数据库·oracle
篱笆院的狗1 小时前
如何使用 Redis 快速实现布隆过滤器?
数据库·redis·缓存
洛神灬殇2 小时前
【LLM大模型技术专题】「入门到精通系列教程」基于ai-openai-spring-boot-starter集成开发实战指南
网络·数据库·微服务·云原生·架构
小鸡脚来咯2 小时前
redis分片集群架构
数据库·redis·架构
christine-rr3 小时前
征文投稿:如何写一份实用的技术文档?——以软件配置为例
运维·前端·网络·数据库·软件构建
海尔辛3 小时前
SQL 基础入门
数据库·sql
betazhou5 小时前
有没有 MariaDB 5.5.56 对应 MySQL CONNECTION_CONTROL 插件
linux·数据库·mysql·oracle·mariadb
Elohim8155 小时前
数据库SQLite基础
数据库·sqlite