Sets the maximum number of rows that the IQ optimizer considers for a GROUP BY CUBE operation.
0 – 4294967295
10000000
Can be set by any user, at any level. This option takes effect immediately.
When generating a query plan, the IQ optimizer estimates the
total number of groups generated by the GROUP BY CUBE hash
operation. The IQ optimizer uses a hash algorithm for the GROUP
BY CUBE operation. This option sets an upper boundary
for the number of estimated rows the optimizer considers for a hash
algorithm that can be run. If the actual number of rows exceeds
the MAX_CUBE_RESULT option
value, the optimizer stops processing the query and returns the
error message Estimate number: nnn exceeds
the default MAX_CUBE_RESULT of
GROUP BY CUBE or ROLLUP
, where nnn is
the number estimated by the IQ optimizer.
Set MAX_CUBE_RESULT to zero to override the default value. When this option is set to zero, the IQ optimizer does not check the row limit and allows the query to run. Setting MAX_CUBE_RESULT to zero is not recommended, as the query might not succeed.