Changes

Jump to navigation Jump to search
706 bytes added ,  14:25, 13 July 2020
no edit summary
db:open('addressbook')//city
</syntaxhighlight>
 
=Evaluation-Time Optimizations=
 
==Comparisons==
 
In many cases, the amount of data to be processed is only known after the query has been compiled. Moreover, the data that is looped through expressions may change.
 
If sequences of items are compared against each other, a dynamic hash index will be generated, and the total number of comparisons can be significantly reduced. In the following example, <code>count($input1) * count($input2)</code> comparisons would be made without intermediate index:
 
<syntaxhighlight lang="xquery">
let $input1 := file:read-text-lines('huge1.txt')
let $input2 := file:read-text-lines('huge2.txt')
return $input1[not(. = $input2)]
</syntaxhighlight>
 
==Pre-Evaluation==
=Changelog=
Introduced with Version 9.4.
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu