Have noticed database has grown to 13mb since site launch - but very little has been added

Permalink
Hi There,

We have a site that was launched around 50 pages and the database at that time was 3.1mb.

However, we've just been asked to perform some updates and while making a database backup, noticed the database is now 13mb - but only about 4 pages have been added.

Is there something I could check to ensure nothing is wrong - or is this normal.

Cheers

Ben

 
Mainio replied on at Permalink Reply
Mainio
Completely normal. Concrete5 is quite heavy for the database.

I have one site that launched about 1.5 years ago and its database is bit over 50mb currently.

The main reason for this is concrete's versioning system. Each block version is saved against each page version which uses quite much database.

Each time you edit a page, new version is created for that page and each of its blocks, their styles and area layouts (I'm not sure whether I missed something).

Probably the biggest table in your database is CollectionVersionBlocks.

Also, if you've used layouts or styles these might also be quite big:
- CollectionVersionAreaLayouts
- CollectionVersionAreaStyles
- CollectionVersionBlockStyles

In the new versions of concrete5 you have a job to delete old versions under System & Settings => Optimization => Automated Jobs.

Best,
Antti / Mainio
JohntheFish replied on at Permalink Best Answer Reply
JohntheFish
By default, the PageStatistics are recorded for each page visit. The PageStatistics table can grow pretty big. You can turn off statistics collection via the dashboard and then use phpMyAdmin to empty or delete the table.
Mainio replied on at Permalink Reply
Mainio
Good one John! Forgot about that one because that option is turned off from 100% of our sites. :)
cmscss replied on at Permalink Reply
Awesome! Page stats was the issue.

Before deleting the content of that table, I downloaded the full database and it had ballooned to 23MB from 13MB yesterday - after deletion it's now only 4.4MB.

The really weird thing is that after importing into MAMP locally, it went from 13MB on the LIVE server to 23MB in MAMP.

Anyway, will look out for this in future.

Cheers

Ben