</pre>
The paths statistics are e.g. used to pre-evaluate the {{MonoCode|count()}} function:
<pre class="brush:xquery">
==Document Index==
The document index contains references to the {{MonoCode|pre}} values of all document nodes. It speeds up the access to specific documents in a database, and it will be automatically updated when updates are performed.
The following query will be sped up by the document index:
==Full-Text Index==
The [[Full-Text]] index speeds up queries using the {{MonoCode|contains text}} expression. Internally, two index structures are provided: the default index sorts all keys alphabetically by their character length. It is particularly fast if fuzzy searches are performed. The second index is a compressed trie structure, which needs slightly more memory, but is specialized on wildcard searches. Both index structures will be merged in a future version of BaseX.
The following queries are examples for expressions that will be optimized for index access (provided that the relevant index exists in a particular database):