Large Database

I've notice in my cPanel that on a relatively new install of C5 that my database is over 40Mb. This seems high compared to my Wordpress blog install which is just 4Mb.

Is this normal?


View Replies:
Remo replied on at Permalink Reply
I wouldn't call 40MB large for a database, but it's true, most c5 databases are smaller.

However, concrete5 tracks all changes, no matter if you remove a block, change an attribute on a site or whatever you do, the information is kept in the database. Another reason why your database got bigger might be the page statistics (

It would help if you would tell us which tables are big though. These are just theories..
laweffect replied on at Permalink Reply
Thanks for the advice Remo.

I've now stopped the page stats collection and cleared the database table. Non of the tables look out of the ordinary in terms of size - the biggest being 'blocks' @ 1.5MB.

Another thing I've noticed is that in cPanel the database size is now down to 37.34 MB. However, looking in phpMyAdmin it looks like the total only adds up to 7.8 MB. Is there usually a discrepancy between the two?

Thanks again.
Remo replied on at Permalink Reply
I don't use phpMyAdmin but you might want to look for an "optimize table" feature. I'm pretty sure it's there..
nazweb replied on at Permalink Reply
Most people only think about table rows when calculating database size, but a table has a lot of metadata associated with it. Really only two parts take up any meaningful size, though, the data and any indexes. Indexes can easily be larger than the data.

This page has some good information on how you can double-check database size:

Here's a modified query that will show you data size and index size broken out:

SELECT table_schema "Data Base Name", SUM( data_length) / 1024 / 1024  "Data Base Size in MB", SUM( index_length) / 1024 / 1024  "Index Size in MB" FROM information_schema.TABLES GROUP BY table_schema;