IGNORECONST
In a directed query, maps an input query constant to one or more annotated query constants.
IGNORECONST
lets you create directed queries that support input queries with various conditions. IGNORECONST
requires an integer argument. This argument matches constants in input and annotated queries that you want the optimizer to ignore.
For details, see Ignoring Constants in Directed Queries in the Administrator's Guide.
Syntax
/*+ IGNORECONST(arg) */
Examples
In the following example a directed query is created where input and annotated queries set IGNORECONST
hints on Employee_city
and Employee_position
:
=> SAVE QUERY SELECT Employee_first_name, Employee_last_name FROM EMP_Dimension WHERE Employee_city='somewhere'/*+IGNORECONST(1)*/ AND Employee_position='somejob' /*+IGNORECONST(2)*/; SAVE QUERY => CREATE DIRECTED QUERY CUSTOM 'findEmployees' SELECT Employee_first_name, Employee_last_name FROM EMP_Dimension /*+projs('public.Emp_Dimension_Unseg')*/ WHERE Employee_city='somewhere'/*+IGNORECONST(1)*/ AND Employee_position='somejob'/*+IGNORECONST(2)*/; CREATE DIRECTED QUERY
IGNORECONST
pairs two sets of constants:
IGNORECONST(1)
pairs input and annotated query settings forEmployee_city
.IGNORECONST(2)
pairs input and annotated query settings forEmployee_position
.