Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Jun 2002
    Posts
    553
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Database maintenance

    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

  • #2
    New Coder
    Join Date
    Jun 2002
    Location
    Stuck in the inner reaches of my mind
    Posts
    84
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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...

  • #3
    Regular Coder
    Join Date
    Jun 2002
    Posts
    553
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks much, Javaman.... I wonder do most concern themselves with this?

    G


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •