产生原因:oracle 使用 in 关键字查询且集合数量大小大于1000
解决办法:
第一种、将集合拆分,使用or 连接。
select * from A where id in (1, 2, …, 1000) or id in (1001, …, 1999)
第二种、将集合修改为查询语句
select * from A where id in (select id from B)
第三种、与 第二种 类似,使用 with as 语法,把条件封装成一个表
with temp as (select * from B)
select * from A where id in (select id from temp)
推荐使用第二种方式。