explain returns a result set of single varchar column rows.
The explain function compiles a SQL statement and returns a description of the compilation as a result set. The set consists of one column, a varchar, which corresponds to each line of the description but may be long, several hundred characters.
The output is not a complete disassembly of the query graph but is detailed enough to show the join order, subquery structure and the order of evaluation of predicates as well as the splitting of a distributed VDB query over different data sources.
The optional cursor type can be one of the SQL_CURSOR_<xx> constants. The default is 0, for forward only. If the statement is a SELECT and the cursor type is not forward only, the auxiliary SQL statements used by the cursor implementation are shown.
Specifying a cursor type of -5 produces a diagnostic dump to the server's standard output. This contains the costs associated with different join orders tried during the compilation.