From: <sju...@ko...> - 2005-03-22 15:11:28
|
Hello, fn:round() returns what looks like xs:decimal even though it should(?)=20= return an integer, at least when looking at the examples in the XQuery=20= function specs: > =95 fn:round(2.5) returns 3. > =95 fn:round(2.4999) returns 2. Here's my own code: let $r :=3D document('/db/ordbase/terms/SD-terms/termcenter.xml') //entry/@id return round(max($r)) This always returns values of the form '1234.0' instead of the expected=20= '1234'. Or is there something I have misunderstood? fn:max() takes quite some time in the above example, on average 2,5=20 seconds. This is true even though I have the attribute in question=20 indexed as an xs:integer: <create path=3D"/termCenter/entry/@id" type=3D"xs:integer"/> There are 12235 instances of this attribute. The speed is roughly the=20 same without the range index, whereas I would expect the range index to=20= improve the response time also in this case. Regards, Sjur |