Hi everybody,
I have the following doubt:
Let’s consider a XQuery retrieving documents from 2 different doctypes, like :
for $x in input()/doctype1, $y in input()/doctype2
where $x/property1 = $y/property2
return $x
This query will take a time, let’s suppose t1
Now let’s suppose to put the result into a variable $z
let $z:= for $x in input()/doctype1, $y in input()/doctype2
where $x/property1 = $y/property2
return $x
Now
for $k in $z return {$k/*} will take a time, let’s suppose t2
Is t2 < t1?
Is it right supposing that the last for is very quick because it does not perform a query but it only loops into a cursor?
In general, a for like the previous one does it have a light weight in a complex XQuery?
I look forward to hearing something from you.