ADD_TRACE
Use this procedure to enable a trace. If the trace has not been enabled, this call adds the trace to the list of active traces and resets its value to 0. If the trace has already been enabled, an error is raised.
Syntax
CTX_OUTPUT.ADD_TRACE(trace_id BINARY_INTEGER);
trace_id
Specify the ID of the trace to enable. See Table 11-1 for possible trace values.
Notes
Table 11-1 shows the available traces:
Table 1 Available Traces
| Symbol | ID | Metric |
|---|---|---|
TRACE_IDX_USER_DATASTORE |
1 | Time spent executing user datastore |
TRACE_IDX_AUTO_FILTER |
2 | Time spent invoking the AUTO_FILTER filter. (Replaces the deprecated TRACE_IDX_INSO_FILTER trace) |
TRACE_QRY_XX_TIME |
3 | Time spent executing the $X cursor |
TRACE_QRY_XF_TIME |
4 | Time spent fetching from $X |
TRACE_QRY_X_ROWS |
5 | Total number of rows whose token metadata was fetched from $X |
TRACE_QRY_IF_TIME |
6 | Time spent fetching the LOB locator from $I |
TRACE_QRY_IR_TIME |
7 | Time spent reading $I LOB information |
TRACE_QRY_I_ROWS |
8 | Number of rows whose $I token_info was actually read |
TRACE_QRY_I_SIZE |
9 | Number of bytes read from $I LOBs |
TRACE_QRY_R_TIME |
10 | Time spent fetching and reading$R information |
TRACE_QRY_CON_TIME |
11 | Time spent in CONTAINS processing (drexrcontains/drexrstart/drexrfetch) |
TRACE_QRY_S_TIME |
15 | Time spent fetching and reading $S information |
TRACE_QRY_O_TIME |
19 | Time spent reading $O information |
TRACE_QRY_D_TIME |
23 | Time spent reading $D information |
TRACE_QRY_SNIPPET_TIME |
25 | Time spent extracting a snippet from a document |
TRACE_HIL_DOCSERV_TIME |
26 | Time spent by document service procedures (snippet, highlight, and markup) |
Tracing is independent of logging. Logging does not have to be on to start tracing, and vice-versa.
Traces are associated with a session-they can measure operations that take place within a single session, and conversely, cannot make measurements across sessions.
During parallel sync or optimize, the trace profile will be copied to the worker sessions only if tracing is currently enabled. Each worker will accumulate its own traces and implicitly write all trace values to the worker logfile before termination.