SQL/MX 2.x Reference Manual (H06.10+, J06.03+)
SQL/MX Functions and Expressions
HP NonStop SQL/MX Reference Manual—544517-008
9-29
Examples of COMPILERCONTROLS
Examples of COMPILERCONTROLS
•
To display control tables, set the following CTs to ON:
>>control table t3 mdam 'on';
--- SQL operation complete.
>>control table t4 mdam 'on';
--- SQL operation complete.
To view compiler controls of type CT that are active, run the following query:
>>select * from table(compilercontrols()) where type = 'CT';
The query displays the following output:
SEQNUM TYPE STATE ATTRIBUTE ATTRIBUTE_VALUE TABLE_NAME
------ ---- ---- --------- ------------- ----------
0 CT BY_USER MDAM ON T3
0 CT BY_USER MDAM ON T4
--- 2 row(s) selected.
•
Consider that the following CQS is set to ON:
>>CONTROL QUERY SHAPE JOIN (CUT,UNION(CUT,SCAN));
--- SQL operation complete.
To view the control query shape, run the following query:
>>select * from table(compilercontrols()) where type =
'CQS'and state = 'BY_USER';
The query displays the following output:
SEQNUM TYPE STATE ATTRIBUTE ATTRIBUTE_VALUE TABLE_NAME
------ --- ---- -------- ------------- ----------
0 CQS BY_USER CONTROL QUERY SHAPE CONTROL QUERY
SHAPE JOIN (CUT, UNION(CUT, SCAN)); ?
--- 1 row(s) selected.
•
Consider that the following CQS is set to ON:
>>CONTROL QUERY SHAPE SCAN (TABLE 'T1', PATH 'IT1');
--- SQL operation complete.
To view the control query shape, run the following query:
>>select * from table(compilercontrols()) where type =
'CQS'and state = 'BY_USER';










