[dev] [Nic] Added feature: purge old records

Roel Gloudemans roel at gloudemans.info
Fri Oct 29 09:02:55 PDT 2004


Quoting Jan Schneider <jan at horde.org>:

> Nice, this annoyed me too, but never enough to implement purging. A few
> suggestions though: The time to keep old records should be a configuration
> setting,
Yes that is a good idea. Will build that one in.

> and the purging should be integrated into statusMonitor.php. Not
> that it should be run each time the status gets updated, but with some
> clever interval depending on the purge days.
I'm wondering. If you run it each time with statusMonitor, it will delete one
monitoring cycle and add another, this then will be a kind of round robin
database. I don't know how e.g. mysql is handling this exactly, but it 
is using
freed space from earlier deletes. Also, if the information per cycle differs a
lot; fragmentation could take place.

Options to do it otherwise:
2) if the oldest record is more than a day older than set set treshold 
run purge
3) Create an entry in the datatree; or a file in vfs to record the last 
time run

I'm leaning towards 2 since it requires no extra storage elements

Cheers,
Roel.




More information about the dev mailing list