IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

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.


#TechXchangePresenter
 View Only
Expand all | Collapse all

XQuery performing question

  • 1.  XQuery performing question

    Posted Tue January 24, 2006 09:53 AM

    Hi everybody,

    I have the following doubt:

    Let’s consider a XQuery retrieving documents from 2 different doctypes, like :

    for $x in input()/doctype1, $y in input()/doctype2
    where $x/property1 = $y/property2

    return $x

    This query will take a time, let’s suppose t1

    Now let’s suppose to put the result into a variable $z

    let $z:= for $x in input()/doctype1, $y in input()/doctype2
    where $x/property1 = $y/property2

    return $x

    Now

    for $k in $z return {$k/*} will take a time, let’s suppose t2

    Is t2 < t1?

    Is it right supposing that the last for is very quick because it does not perform a query but it only loops into a cursor?

    In general, a for like the previous one does it have a light weight in a complex XQuery?

    I look forward to hearing something from you.


    #API-Management
    #Tamino
    #webMethods


  • 2.  RE: XQuery performing question

    Posted Wed January 25, 2006 11:41 AM

    Hi,

    From my point of view the first variant will provide better performance, because both queries perform a join operation.
    But the second one also does some result construction.
    For the performance of both queries it is of highly relevance that proper indexing has been performed.
    In certain cases you can also improve the performance by applying the “index-only” join method in Tamino.

    Best Regards,

    Thorsten Fiebig


    #Tamino
    #API-Management
    #webMethods