[xquery-talk] unordered {} and fn:unordered()

Torsten Grust grust at in.tum.de
Thu Jan 19 11:45:54 PST 2006


Dear all,

   the W3C XQuery Candidate Recommendation says (quoting from 
http://www.w3.org/TR/xquery/#id-unordered-expressions):

''For expressions where the ordering of the result is not significant, a 
performance advantage may be realized by setting the ordering mode to 
unordered, thereby granting the system flexibility to return the result 
in the order that it finds most efficient.''

I am wondering whether you have noticed that your favorite XQuery 
processor indeed realizes such an advantage when it processes 
expressions of the form unordered {e} or fn:unordered(e)?

(There are, of course, a lot more scenarios in XQuery where order 
doesn't matter, e.g., the existential semantics of general comparison 
operators, aggregate functions (fn:max(), ...), other builtin functions 
(fn:empty(), ...), FLWORs whose result is explicitly reordered via 
'order by', etc.)

Proper order maintenance can significantly impact query performance -- I 
think this is something we can all agree upon.  (Can we?)  The margin of 
what can be gained from ''unorderedness'' thus should be noticable.

Curious,
    --Torsten
-- 
   | Prof. Dr. Torsten Grust                         grust at in.tum.de |
   |                                 http://www-db.in.tum.de/~grust/ |
   |     Database Systems - Technische Universität München (Germany) |


More information about the talk mailing list