Jump to:

23007 Posts in 11866 Topics by 2828 members

General Questions

SilverStripe Forums » General Questions » Cleaning Database

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 633 Views
  • Andre
    Avatar
    Community Member
    125 Posts

    Cleaning Database Link to this post

    Hi there,

    is it Possible to make a cleanup over the Database. I'm experimenting with a Website that was having to many Page Objects. So Admin slowed down horribly. Monitoring the Server with htop, it told me, that DB took lot of CPU Performance while choosing a Branch in the Sitetree. Now I try to make some imrovements by using the subsites module and expanding it with some Funktionality.

    By deleting alle Pages from the Site in my Local Backup installation, I saw, that there are still many 1000 Pages Left in Database Table SiteTree (and all related tables).

    I found some hints, that I can delete SiteTree_versions to delete the history, but what about SiteTree and SiteTree_Live? How do I investigate, which Rows are already deleted, and why are they left in the Tables?

    regards

  • Andre
    Avatar
    Community Member
    125 Posts

    Re: Cleaning Database Link to this post

    So I'm one step further. When in Backend on Page Tree and selcting on Show: "All pages, including deleted", I see lots of orphaned Pages. Some of them are in Hirarchie, some are not, some are selectable, some throw errors, but there is one thing they all have in common. I can't delete them. The only Possibility is to restore them. I tried to reengeneer, how the sql statement is build to get all these orphaned Page IDs, but without success. Maybe someone can help me here by giving me the statement to return all orphaned Pages (or the statement, to return all IDs of Pages that are not deleted, to try it from the other side). This will help me, to write a tidy script that is cleaning my Database.

    633 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.