eZ Community » Forums » General » Huge database
expandshrink

Huge database

Huge database

Saturday 11 July 2009 1:17:54 pm - 9 replies

A database dump for my site, which is a blog with a few hundred entries, is coming upwards og 900MB. The size seems excessive, and I was wondering if there are any cleanup utilities to run on it?

I've cleaned out the trash, but that don't seem to help. Also, the database schema is fairly complex, so guessing which table is holding heaps of unused data is not simple. Any hints on how to slim my database?

Saturday 11 July 2009 1:34:38 pm

Sadly the size is quite common.

Save your self some headache and simply adapt.

I've seen much larger sizes in GB of exports of active clean eZ Publish installation databases.

I suggest reading up on the php shell script, flatten.php and cleanup.php

These should help you reduce some database size.

<i>[0] http://ez.no/doc/ez_publish/upgra...the_system_upgrade_scripts</i>

Cheers,
Heaht

Saturday 11 July 2009 1:54:45 pm

Thanks, I'll read up on them. 900MBs of database for a simple blog is insane. The size is not really a problem in terms of storage space, but it is causing me headaches in terms of backup. Takes too long to backup a copy of the database.

If I can't considerably reduce the db size I fear I'll migrate the site to another solution sad.gif Emoticon

Thanks for your help!

Saturday 11 July 2009 1:58:31 pm

Migrate to wordpress Christian which can be very small.

You will never get eZ to fit the size
of db I know your looking for.

Also your prolly using the content tree
to store comments for your blog
which is also a huge performance
problem just waiting to be understood.

Cheers,
<i>//kracker</i>

Saturday 11 July 2009 2:49:49 pm

Hi Christian,

As eZ Publish stores sessions informations in the database, you have to enable session.gc_probability so the expired sessions are purged:

so in your php.ini check if your have these parameters:

session.gc_probability = 1
session.gc_divisor = 100

If you look at your database size you will find that the ezsession table is huge !

For now you can truncate the ezsession table :

mysql >truncate table ezsession

or use the cleanup script

php update/common/scripts/cleanup.php session
php update/common/scripts/cleanup.php expired_session

Mo

Modified on Saturday 11 July 2009 2:50:25 pm by Karnichi Mohamed

Saturday 11 July 2009 11:00:31 pm

Hi Christian,

can you tell us which of the tables causes such a large size of the dump? If it is ezsession then you should run clean up scripts like my previous writers told you - if it is ezcontentobject_attribute you may check the number of versions you store and the number of attributes in this classes.

Saturday 18 July 2009 10:07:55 pm

I cleaned up the sessions, and wow. I mean, WOW! Incredible:

-rw-r--r-- 1 christian users 904M 2009-07-18 21:58 20090718-1.sql
-rw-r--r-- 1 christian users  25M 2009-07-18 22:02 20090718-2.sql

That's pre and post session cleanup. Problem solved happy.gif Emoticon Thanks alot all!

Kracker: I'd be interested to know how you recon storing comments in the content tree is a problem? In what other way can I really store them? If you're thinking about the tree menu, I obviously don't show them there. I have quite a bit of content, and haven't had any real performance trouble yet...

Saturday 18 July 2009 10:15:42 pm

Wow you sure proved me wrong. That's quite small.

Checkout, http://projects.ez.no/cscomment

Cheers,
//kracker

Saturday 18 July 2009 11:10:29 pm

Yeah, I know. At first I was certain that my data had been corrupted, but it's still sane. Cool!

Thanks for the link, I'll check it out!

Sunday 19 July 2009 8:40:19 pm

I asked Heath to add a node about this topic on eZpedia,
<i>http://ezpedia.org/en/ez/solution...database_backup_dump_files</i>

Cheers,<i>
//kracker</i>

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from