Database Reference
In-Depth Information
in “Serialization Options” on page 119 ), you can turn it on again for specific
expressions with this pragma.
exist:timer
Measures the time it takes to execute the XQuery expressions within the
pragma—for instance, (# exist:timer #) { count(//TEST) } .
To see the timer, you need to enable tracing in the $EXIST_HOME/log4j.xml
configuration file (set <priority value="trace"/> for the root logger). You'll
see an entry like this in the $EXIST_HOME\webapp\WEB-INF\logs\exist.log file:
2012-09-12 15:01:29,846 [eXistThread-31] TRACE (TimerPragma.java [after]:63)
- Elapsed: 171ms. for expression: count([root-node]/descendant::{}TEST)
Limiting Execution Time and Output Size
You can control execution time and query output size by adding the correct declare
option exist:... statement to the XQuery prolog:
declare option exist:timeout "time-in-msecs"
Indicates the maximum amount of time (specified in milliseconds) that a query
is allowed to execute for. If this is exceeded, an error will be raised.
declare option exist:output-size-limit "size-hint";
Defines a limit on the maximum size of created document fragments. This limit
is an estimation, specified in terms of the accumulated number of nodes con‐
tained in all generated fragments. If this is exceeded, an error will be raised.
Other Options
Here are some miscellaneous options you can set by adding a declare option
exist:... statement to the XQuery prolog:
declare option exist:implicit-timezone "duration";
Specifies the implicit time zone for the XQuery context as defined in the XQuery
standard. More information is available at http://www.w3.org/TR/xquery/#dt-
timezone .
declare option exist:current-dateTime "dateTime";
If for some reason you don't want to use your operating system's date/time, you
can specify your own using this option (it is merely there to enable some of the
XQuery test suite cases to run).
declare option exist:optimize "enable=yes|no";
Use this to disable the query optimizer in eXist (the default is yes , of course).
This is linked to the exist:optimize pragma; see “eXist XQuery Pragmas” on
page 123 .
Search WWH ::




Custom Search