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.



#Automation


#Applicationintegration
#webMethods
#Integration
 View Only
  • 1.  Problem performance xquery with not(...)

    Posted 09/09/08 08:55 AM

    Hello,

    I have a Person structure XML like this exemple:

    I write this Xquery:

    
    for $pers in (input()/Person[@Name='Benoit' and @Valid=1 and @Vorname='Albert' and Address[Street and not(PNumber) and not(City)]])[position() > 0 and position() <= 10] return $pers

    When I execture this Xquery I wait a few minutes before to receive an answer!!!

    However, I have a Text index on City et PNumber!

    Has anyone an idea, how can I improve the performance of my xquery?

    Thank you for your help!

    Cedric


    #webMethods
    #Tamino
    #API-Management


  • 2.  RE: Problem performance xquery with not(...)

    Posted 09/09/08 03:28 PM

    Do you have indexes on @Name and @Vorname? I would think that would be important too.


    #Tamino
    #API-Management
    #webMethods


  • 3.  RE: Problem performance xquery with not(...)

    Posted 09/09/08 05:13 PM

    Hi Curtis,

    Yes of course @Naame and @Vorname et @Valid has an indexe. But when I execute this xquery without the negative function not(…), the responses of the query is fast. But when I execute the query with the negative function not(…), it’s take a long time:

    Do you know anything else to improve the performance?

    Thank you for your help!

    Cedirc


    #API-Management
    #webMethods
    #Tamino


  • 4.  RE: Problem performance xquery with not(...)

    Posted 09/11/08 08:24 AM

    Hi,

    Does anyone know if I can change the xquery to have the same result without the function negative not(…).

    Thank you for your help!

    Cedric


    #webMethods
    #Tamino
    #API-Management


  • 5.  RE: Problem performance xquery with not(...)

    Posted 09/11/08 08:47 AM

    Hi,

    without details about number and size of documents I cannot test, but you might try the following modified query to see whether separating the conditions helps:

    
    for $pers in (input()/Person[@Name='Benoit' and @Valid=1 and @Vorname='Albert'])
    let $address:=$pers/Address
    where $address/Street and not($address/PNumber) and not($address/City)
    return $pers 

    I left out position by purpose, to make the query simpler, this can be re-added later

    Best regards

    Harald


    #API-Management
    #Tamino
    #webMethods


  • 6.  RE: Problem performance xquery with not(...)

    Posted 09/11/08 04:04 PM

    I try your idea,

    But the result for the performance is the same! The database contains 150’000 records of person and this structure Person XML contains others lements than theses I show you.

    I have another idea! Now, I have a text index on PNumber et City element. I will apply a standard-text on these two elements and the conidtion in the query will be

    insead of

    I see that the condition not(…) in xquery takes a lot of Tamino ressources.

    If you have another idea, tell me!

    Thank you for your help!

    C


    #webMethods
    #Tamino
    #API-Management


  • 7.  RE: Problem performance xquery with not(...)

    Posted 09/15/08 12:48 PM

    Hi,

    Your posting says that you have defined a text index. Unfortunately the text index can not be use for comparison predicates. Please define a standard index on the elements / attributes you are considering.

    Best Regards,

    Thorsten


    #API-Management
    #webMethods
    #Tamino


  • 8.  RE: Problem performance xquery with not(...)

    Posted 09/16/08 09:32 AM

    Hi Thorsten,

    I applied a standard on element PNumber and City. The performance of the xquery below is fast now:

    Now the answer is very good!

    Thank you everyone for your help and see you soon!

    Cedric :wink:


    #API-Management
    #Tamino
    #webMethods