rom-sql icon indicating copy to clipboard operation
rom-sql copied to clipboard

OCIError: ORA-01795: maximum number of expressions in a list is 1000

Open koskoci opened this issue 7 years ago • 2 comments

We get this error often when we use combine or aggregate in a rom-repository: OCIError: ORA-01795: maximum number of expressions in a list is 1000 I believe this is because the above methods use subselects under the hood. Another option would be to use joins (eg. with wrap) but this is not feasible in our case.

Would it be possible to override this limitation of 1000 items in a list? Alternatively, is there a workaround you could suggest for this perhaps?

Your help would be much appreciated.

koskoci avatar Jan 25 '18 16:01 koskoci

Here is a SO answer about possible workarounds https://stackoverflow.com/questions/17842453/is-there-a-workaround-for-ora-01795-maximum-number-of-expressions-in-a-list-is/32440238#32440238

koskoci avatar Jan 26 '18 10:01 koskoci

@koskoci yeah, all of them are rather ugly but we could slice ids into 1000-max lists and use multiple ORs. At the moment, I don't think there is anything except join

flash-gordon avatar Jan 26 '18 11:01 flash-gordon