...

Database maintenance

gorilla1
07-30-2002, 08:06 PM
Another basic question that I have not been able to find an answer to. Let's say I have a database, and I am comfortable only keeping the last X number of current records - the older ones I can discard. Can I simply delete the oldest record whenever I exceed X and have the database size be constant? Or will there be 'gas' in the database and I will need to do some kind of compress function regularly to prevent it from growing?

G

Thejavaman1
08-05-2002, 08:15 AM
mysql has built in clean up functions so your best bet would be to write a part in to your code to automaticly delete and clean up the db as records were added. Or write a shell script and use the crontab to run it ever so often...

gorilla1
08-08-2002, 12:37 AM
Thanks much, Javaman.... I wonder do most concern themselves with this?

G



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum