MAX_HASH_ROWS option

Function

Sets the maximum number of rows that the IQ optimizer considers for a hash algorithm.

Allowed values

Integer up to 4294967295

Default

2500000

Scope

Can be set temporary for an individual connection or the PUBLIC group. DBA permissions are not required to set the option. This option takes effect immediately.

Description

When generating a query plan, the IQ optimizer might have several algorithms (hash, sort, indexed) to choose from when processing a particular part of a query. These choices often depend on estimates of the number of rows to process or generate from that part of the query. This option sets an upper boundary for how many estimated rows are considered for a hash algorithm.

For example, if there is a join between two tables, and the estimated number of rows entering the join from both tables exceeds the value of MAX_HASH_ROWS, the optimizer does not consider a hash join. On systems with more than 50 MB per user of temporary buffer cache space, you might want to consider a higher value for this option.