On Mon, Dec 18, 2006 at 12:23:53PM -0800, Jason Hunter wrote:
> I suspect your slowness isn't due to the sorting as much as it is all 
> the distinct-values() calls and the fact you're not using any searchable 
> XPath expressions.  I expect that by using lexicons, a new feature in 
> 3.1, and some searchable XPaths you could gain a terrific speed boost.

thanks a lot. i'll try this out if i need to squeeze more speed out of
the search. in the meantime, i got more reasonable timings today by
simply doing this:

  for $i in $results
  order by $i//titleName, $i//titleTypeName, $i//titlePhotoSequenceNumber
  return $i

(i had originally extended something i saw in a w3c non-normative
xquery example, but then, upon [much] further reflection, i stepped
back from my original solution.)

also, the reason i posted to this group and not to a general xquery
group is that i have noticed that using searchable xpaths in marklogic
is much, much faster than using xquery as if it were just another
functional programming language; i.e., manipulating sequences as if
they were lists in another programming language appears to be a lot
slower than putting the database to use, so i'm glad to have gotten
a marklogic-specific pointer.


_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general

Reply via email to