searching xml

  • for our products we decided to save properties in xml. Since we have several different property sets we use sys.sys in the xml type specification. We then have an index on that field.

    So we have different types of searches that are conducted. this one is for New product. The application sends in the xml and I am supposed to do a comparison to what we have to see if it is new. So the approach was

    where Cast(colxml as nvarchar(max)) = Cast(@colxml as nvarchar(max))

    I do not believe this would take advantage of the index where I use xquery.value in other areas to make the fields.

    When the xml is sent in would it be better for me to use Open XML and then do the comparison or is the string comparison ok?

  • Your description is not very clear (at least to me it isn't)...

    Please provide table def and sample data of your xml table together with a sample of your NewProductToSearchFor in the format you'll receive it from your app.

    Question on top: will the app always "ask" for one product at a time? If not, please include it in your sample code.



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply