There's another workaround for this that isn't mentioned in any of the other answers (or other answered questions):
Any in statement like x in (1,2,3)
can be rewritten as (1,x) in ((1,1), (1,2), (1,3))
and the 1000 element limit will no longer apply. I've tested with an index on x
and explain plan still reports that Oracle is using an access predicate and range scan.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…