【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>
相关推荐
fly spider7 分钟前
MySQL事务详解
数据库·mysql
螺丝钉code7 分钟前
Hermes Agent 进阶实践:自动化工作流与协同
运维·数据库·自动化
格鸰爱童话11 分钟前
跟着AI学sql
数据库·sql
robinson198817 分钟前
测试Oracle-崖山常规路径INSERT性能
oracle·崖山数据库·insert性能
啦啦啦_999919 分钟前
1. MySQL
数据库·mysql·oracle
随风,奔跑23 分钟前
MySQL性能调优
数据库·mysql·oracle
QH1392923188026 分钟前
是德科技KEYSIGHT N5183B 9 kHz~40 GHz微波模拟信号发生器
网络·数据库·科技·嵌入式硬件·集成测试
暗暗别做白日梦29 分钟前
Redisson 延迟队列实现订单支付超时自动取消(源码 + 原理全解)
数据库·redis
qingwufeiyang_53029 分钟前
Mybatis学习笔记-1-快速入门
笔记·学习·mybatis
数厘31 分钟前
2.13 sql数据更新(UPDATE)
数据库·sql·oracle