Temat: jdbc ORA-02395: exceeded call limit on IO usage
ORA 2395 mówi o przekroczeniu limitu LOGICAL_READS_PER_CALL z profilu.
Z SQL Lang Ref
"LOGICAL_READS_PER_CALL Specify the permitted number of data blocks read for a call to process a SQL statement (a parse, execute, or fetch)."
z Metalink doc ID 872133.1
"To explain further, by way of example, suppose we have set arraysize to 500 in sqlplus (SET ARRAYSIZE=500) to limit each fetch to 500 rows. Then the maximum value that LOGICAL_READS_PER_CALL will ever get to (for a select * from tab1) is 500/(number of rows of tab1 that fit on a block). So if there are 10 rows on each block, then the maximum LOGICAL_READS_PER_CALL would reach would be 50 as each 500 rows would instigate a new fetch, i.e. a new call, and reset the count. In the case of a select count(*), only one row is returned so all the gets are under one call, hence the limit would be exceeded."
Spróbuj zmniejszyć fetch size (setFetchSize na Statement lub ResultSet). Co prawda zabije to pewnie wydajność, ale jeśli masz to zrobić tylko raz...
Rozwiązania z ROWNUM lu RANK raczej nie pójdą bo zawierają chyba dostęp do całej tabelki w jednym call'u.
Scrollable results w takim przypadku to chyba też kiepski pomysł.
Z "Oracle® Database JDBC Developer's Guide, 11g Release 2 (11.2)" Chapter 17
"Oracle JDBC Implementation for Result Set Scrollability
Because the underlying server does not support scrollable cursors, Oracle JDBC must implement scrollability in a separate layer.
It is important to be aware that this is accomplished by using a client-side memory cache to store rows of a scrollable result set.
Important:
Because all rows of any scrollable result set are stored in the client-side cache, a situation, where the result set contains many rows, many columns, or very large columns, might cause the client-side Java Virtual Machine (JVM) to fail. Do not specify scrollability for a large result set."
Jeśli masz dostęp do utl_file to pewnie wystarczy jeden wieczór grzebania po blogach z oracle security aby z eskalować to do sysdba i poprawić sobie limit :p