Quote:
Originally Posted by robertkwild
hi all,
just a query, when my database gets too big in size, how do i shrink/truncate it, not delete it as the database is live and people use it as its my openfire IM database
is trunacting the right thing to do if your database gets too big in size?
many thanks
rob
|
Hi robertkwild
I am using Apache Web server and MySql database on my web site. In MySql Truncate means "empty" the table and is not recommended for your needs. I would suggest that you write a PHP code (with SQL calls to remove what records you want to discard). Have it search your Database Table for some criterion, such as inactive users, and remove the "records" under program control. I have more than one Table in my Database and as such I might have to write some SQL code to remove records from both my Tables.
I always Export (in SQL code) each of my Database Tables to files so that I could if necessary re import, if I screw up. Because your Database is live, I assume you would create a small table or whatever and test on that. Hope this helps in some way...
Robert