Large Database
Permalink
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?
Thanks.
Is this normal?
Thanks.
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.
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.
I don't use phpMyAdmin but you might want to look for an "optimize table" feature. I'm pretty sure it's there..
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: http://www.mkyong.com/mysql/how-to-calculate-the-mysql-database-siz...
Here's a modified query that will show you data size and index size broken out:
This page has some good information on how you can double-check database size: http://www.mkyong.com/mysql/how-to-calculate-the-mysql-database-siz...
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;
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 (https://www.concrete5.org/documentation/using-concrete5/dashboard/system-and-maintenance/seo-and-statistics/statistics/).
It would help if you would tell us which tables are big though. These are just theories..