4. SQL Statements : SELECT : SELECT Statement Clauses : WITH Clause for SELECT
 
Share this page                  
WITH Clause for SELECT
The WITH clause on the SELECT statement consists of a comma-separated list of one or more of the following options:
[NO]QEP
Specifies whether to display a diagrammatic representation of the query execution plan chosen for the query by the optimizer.
Default: WITH NOQEP
[NO]GREEDY
Enables or disables the exhaustive enumeration heuristic of the query optimizer for complex queries.
When the query references a large number of tables, the greedy enumeration heuristic enables the optimizer to produce a query plan much faster than with its default technique of exhaustive searching for query execution plans.
MAX_PARALLEL n
Sets the parallelism level for the query, where n is an integer from 1 to 256.
The value of n should not exceed the number of CPU cores visible to the operating system. Your query may run at a lower level of parallelism than requested if other parallel queries are running concurrently.
[NO]UNION_FLATTEN
Turns union flattening on or off. Overrides the SET [NO]UNION_FLATTENING statement for the duration of the statement.