XML Datatype

  • Hi,

    I have a column where we are storing values in comma separated format. e.g. 1,2,3.

    These values are primary key off another table , but due to some old design we are living with it.

    I came to know that I can store these comma separated values in XML type column, Also i can use xml values in join with tables.

    I want to know that is there any bottle-neck or any other consideration of using XML datatype for column ? this column will use for all DML operations.

    the data is not pure XML, it is simple varchar "1,2,3,4".

    thank you.

  • XML operations can use more than a trivial amount of additional CPU over an equivalent operation done in standard T-SQL or even CLR. It will depend on many factors so you will need to test various solutions and make your own determination.

    There are many T-SQL and CLR string splitting functions out there as well. Here is a great article on the topic for your consideration:

    http://qa.sqlservercentral.com/articles/tally+table/72993/[/url]

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

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

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