Delete XML data

  • I have a table which has XML data, so it takes lot of time to delete it.

    Here's the condition:

    Archive all data older than 2 months and delete it.

    What would be the good approach for this?

  • You can think of patitioning the table based on week/Month and drop the partition

  • PJ_SQL (8/18/2015)


    I have a table which has XML data, so it takes lot of time to delete it.

    Here's the condition:

    Archive all data older than 2 months and delete it.

    What would be the good approach for this?

    Heh... stop storing XML in tables? 😛

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • Try reading these sqlservercentral links:

    http://www.sqlservercentral.com/articles/Basics/xmlsimplified/1898/[/url]

    http://www.sqlservercentral.com/articles/Basics/3117/[/url]

    Alex S

Viewing 4 posts - 1 through 3 (of 3 total)

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