Queries with IN lists whose accumulative length exceeds the length limit for IN lists may run out of memory

Details

Detail name Value
Changelog Number 4752
Type Bug
Status Resolved
Affected Versions EXASOL 6.0.0, EXASolution 5.0.0
Fix Versions EXASOL 6.0.5
Resolution Date 2018-07-25

Background
Queries may run out of memory if they contain very long IN-lists.
For instance

select * from t where t.x in ('1','2','3','4','5', ...., '1000000');

may run out of memory.
Therefore, EXASOL limits the length of IN lists with a default limit of 200000 elements.

Problem
The size limit is done per IN-list in a query.
Thus, when a query contains several IN lists whose sizes together exceed the limit, the query may still run out of memory

Proposed fix
Change the accounting of the IN list size limits such that it is global for all IN lists in a query.

Workaround
There is no workaround: The IN lists must be shortened or be replaced by subselects.
In the future instead of running out of memory, the SQL process will throw an exception and refuse to process such queries