Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Rotem Orbach 108 posts 591 karma points
    28 days ago
    Rotem Orbach
    0

    Umbraco cmsPropertyData table

    Hi all, I have this table with approx 27M records. does anybody know what it is being used for? can I delete some of the older rows safety ?

    thanks

  • Marc Goodson 1529 posts 10230 karma points MVP 6x c-trib
    27 days ago
    Marc Goodson
    100

    Hi Rotem

    Every time you save a content item in Umbraco it creates a 'version' of it at that point in time - to allow you to rollback in the future.

    The cmsPropertyData table, therefore has a 'row' for every property on every content item, for every version!

    These versions, out of the box, are never tidied up - and I guess for Auditing purposes you might be legally obliged to keep them... but if not then after a year or so, if the is 'well used' then the number of rows in this table can grow to be quite large and slow the Umbraco backoffice down!

    There is a package: unVersion: https://our.umbraco.com/packages/website-utilities/unversion/

    that you can install that allows you to set rules on how many versions to keep per Document Type, either by no of versions or by length of time.

    But bear in mind if you install that, then the first time it runs against that amount of content, you might get timeouts etc.

    The source code is here: https://github.com/skttl/umbraco-unversion so if you are more of a SQL person, you can have a look at the SQL the plugin uses and construct something to run manually if you prefer,.,

    regards

    marc

  • Rotem Orbach 108 posts 591 karma points
    1 week ago
    Rotem Orbach
    0

    Thanks Marc! So, bottom line, can I delete the old ones?

  • Marc Goodson 1529 posts 10230 karma points MVP 6x c-trib
    1 week ago
    Marc Goodson
    0

    Hi Rotem

    If you don't need to roll back to the previous versions, nor for 'legal reasons' need to show who changed what when... then yes, that's what unversion will do, remove the older versions after a set no of versions or after a certain amount of time that you configure...

    ... there are quite a few joins to the cmsPropertyData table, unversion will take care of deleting the records from the related tables in the right order.

    regards

    Marc

Please Sign in or register to post replies

Write your reply to:

Draft