8. SQL Statements : SET : Joinop [No]Timeout
 
Share this page                  
Joinop [No]Timeout
This statement changes the timeout point of the query optimizer. When the query optimizer is checking query execution plans, it stops when it believes that the best plan that it has found takes less time to execute than the amount of time already spent searching for a plan or when it has evaluated all possible query plans, whichever is reached first.
If a SET JOINOP TIMEOUT nnn is issued (where nnn is in milliseconds) the query optimizer stops looking for query execution plans after the specified number of milliseconds and uses the best plan found to that point.
If 0 is specified, the timeout occurs when the optimizer finds that the best plan found so far will take less time to execute than the amount of time already spent evaluating plans (the Ingres default).
If a SET JOINOP NOTIMEOUT statement is issued, the optimizer searches ALL possible query plans.
A SET JOINOP TIMEOUT statement restores the default TIMEOUT.
This option has no effect if the GREEDY option is in effect.