Oracle Text includes a tracing facility that enables you to identify bottlenecks in indexing and querying.
Oracle Text provides a set of predefined traces. Each trace is identified by a unique number. There is also a symbol in CTX_OUTPUT
for this number.
Each trace measures a specific numeric quantity—for instance, the number of $I
rows selected during text queries.
Traces are cumulative counters, so usage is as follows:
The user enables a trace.
The user performs one or more operations. Oracle Text measures activities and accumulates the results in the trace.
The user retrieves the trace value, which is the total value across all operations done in step 2.
The user resets the trace to 0.
The user starts over at Step 2.
So, for instance, if in step 2 the user runs two queries, and query 1 selects 15 rows from $I
, and query 2 selects 17 rows from $I
, then in step 3 the value of the trace would be 32 (15 + 17).
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 slave sessions if and only if tracing is currently enabled. Each slave will accumulate its own traces and implicitly write all trace values to the slave logfile before termination.