April 1999
Intermediate to advanced
584 pages
23h 17m
English
A hint is provided to the cost-based optimizer in the form of a comment within the SQL statement. Specifically, after you begin the comment (with either the “- -” or “/* " comment syntax), start the hint with a “+ " followed by the specific hint. If the hint is not properly formatted, it will not be honored.
The cost-based optimizer is unable to distinguish between an incorrectly specified hint and a comment. If you do not use correct syntax to provide the hint, not only will the hint not be taken, no error message will be generated.
Following are two ways you can specify the same hint:
SELECT /*+ RULE */ emp, ename, job, dname FROM emp,dept WHERE emp.deptno = dept.deptno; SELECT --+ RULE emp, ename, job, dname FROM emp,dept WHERE emp.deptno = dept.deptno;
Read now
Unlock full access