Hi for another time,
I found a big performance killer by myself.
On 03/29/2012 12:18 PM, Ronny Möbius wrote:
declare function vlvz:getlvs($semxml as node()*,$modabbr as xs:string) as node()* { for $l in $semxml//Lesson where $l[AssociatedModules/Module/@Abbr=$modabbr] order by data($l/@ID) return $l };
Replacing "$semxml//Lesson" by "$semxml/Dataset/Lessons/Lesson" makes a difference of about one third of time spent.
Why is that? I thought, I don't have to care about the inefficiency of "//". Isn’t that handled by indices?
All the best, Ronny