View Single Post

  #3 (permalink)  
Old 05-12-2007
Salvatore Sanfilippo
 
Posts: n/a
Default Re: Implementing an history with a limited number of entries with MySQL

On May 12, 1:53 am, "nino9st...@yahoo.com" <nino9st...@yahoo.com>
wrote:
> If I were doing it, I would write a script on the server that would
> run at 2am (or whenever) to check the database and remove history.
> Unless it's a priority to have history removed constantly on the go,
> this is the best way to ensure it can be done properly and off peak
> hours. I run several scripts under cronjobs to manipulate the database
> at night.
>
> Nino


Hello Nino, Thanks for the suggestion, I also use to run scripts via
cron, or even better to have sort of daemons in separated processes
running DB operations incrementally. Here the problem is a bit harder
since I've multiple histories (one for customer) and there are no
"idle"
periods on the server since we are serving customers in different
timezones.

Probably the best solution from the point of view of performances is
to switch from DB to plain files with fixed record length implementing
a circular buffer, but I could like to take the flexibility of the DB.

Regards,
Salvatore

Reply With Quote