xdmp:query-trace( $enabled as xs:boolean ) as empty-sequence()
Enables or disables tracing of this query. When query tracing is enabled, "info" level messages are logged detailing the search optimizations performed.
Parameters | |
---|---|
enabled | Specify true to enable query tracing, false to disenable query tracing. |
Search optimizations are performed in three phases:
- the path analysis phase
- In this phase a path expression is analyzed to determine whether it can be executed in whole or in part through an optimized search. Each individual component of the path is analyzed to see if it is searchable. The searchablity of each path component is logged.
- the search constraint gathering phase
- In this phase, search constraints are gathered from the path expression components. The number of constraints contributed by each path component is logged.
- the search execution phase
- In this phase, a search is performed using the gathered constraints. The actual number of fragments selected for filtering is logged.
xdmp:query-trace(true()) => ()