webMethods

webMethods

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
Expand all | Collapse all

XQuery is slow when not() function is used

  • 1.  XQuery is slow when not() function is used

    Posted Mon August 16, 2004 05:32 PM

    Consider a simple FLWR expression:

    for $q in input()/doctype
    where tf:containsText($q/somefield, “sometext”)
    return $q

    If I enclose the condition in the where clause in a not() function the query slows down extremely and an ?explain? shows that Tamino drops the index usage in that case. I am using Tamino 4.2.

    Is there an optimized way to formulate a query with negated conditions?

    Thanks in advance.


    #webMethods
    #Tamino
    #API-Management


  • 2.  RE: XQuery is slow when not() function is used

    Posted Mon August 16, 2004 06:17 PM

    Hi,

    Unfortunately the XQuery processor does not do any index optimization for negated predicates.
    In certain cases your can specify a negation of a comparison predicate. But for text search predicates there is no way to specify a negation that can be evaluated by accessing an index.

    Best regards,

    Thorsten


    #webMethods
    #API-Management
    #Tamino