Optimizer directives require the SQL or C comment indicators as delimiters.
An optimizer directive or a list of optimizer directives immediately follows the DELETE, SELECT, or UPDATE keyword in the form of a comment. After the comment symbol, the first character in an optimizer directive is always a plus ( + ) sign. No blank space or other whitespace character is allowed between the comment indicator and the plus sign.
You can use any of the following comment indicators:
The double hyphen needs no closing symbol because it specifies only the remainder of the current line as comment. When you use this style, include the optimizer directive on only the current line.
The comment extends from the left brace ( { ) until the next right ( } ) brace; this can be in the same line or in some subsequent line.
The comment extends from the initial slash-asterisk ( /* ) pair until the next asterisk-slash ( */ ) characters in the same line or in some subsequent line.
In ESQL/C, the -keep command option to the esql compiler must be specified when you use C-style comments.
For additional information, see How to Enter SQL Comments.
If you specify multiple directives in the same query, you must separate them with a blank space, a comma, or by any character that you choose. It is recommended that you separate successive directives with a comma.
If the query declares an alias for a table, use the alias (rather than the actual table name) in the optimizer directive specification. Because system-generated index names begin with a blank character, use quotation marks to delimit such names.
Syntax errors in an optimizer directive do not cause a valid query to fail. You can use the SET EXPLAIN statement to obtain information related to such errors.
Enterprise Edition Home | Express Edition Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]