[drupal-devel] prune tables

Bèr Kessels berdrupal at tiscali.be
Wed May 11 12:54:12 UTC 2005


I suggest we enhance useability by emulating two *nix tools: swatch and 
logrotate.

Logrotate would use a separate table, or even database, to store he rotted log 
entries. For normal users logrotate will be set to 0, meaning the 
functionality is not used. Advanced admins can set this to any amount/size or 
time.

swatch will use reg.expressions or other settings to pick out only certain log 
entries. These can be 1) saved for a longer time in the watchdog table and/or 
2) emailed to the administrator. That way the logs can be kept small, while 
ensuring that admins still see or get crucial errors.

Ber

Op woensdag 11 mei 2005 00:06, schreef Dries Buytaert:
> Would it make sense to change the "Discard watchdog/access log entries
> older than" settings to use the number of SQL table rows, rather than
> the number of days?
>
> The problem?  Again, at drupal.org, I had these set to "3 days" which I
> felt was short enough for the tables not to grow unwieldy.  It wasn't
> until this week that I found out -- through extensive profiling -- that
> 3 days was too long.
>
> The point? Unless you are a Drupal developer, you won't profile your
> site.  This means, most users have no clue about how much data is kept
> track of, or why their site becomes slower and slower.
>
> The question? How can we make it so that this doesn't happen?  To me,
> having an option "Number of records to keep" rather than "Discard
> records older than" makes sense, because (i) it gives me control over
> the maximum number of table rows (ii) without having to worry about
> traffic bursts or a growing number of visitors (the cost is more likely
> to be constant over time).  It gives me a clue about the
> performance/resource ramifications of certain features.  Having a
> similar setting for the sessions- and history-table would make sense
> too.
>
> Would this degrade or improve usability?  Suggestions?
>
> --
> Dries Buytaert  ::  http://www.buytaert.net/
Regards,
 Bèr
-- 
 [ Bèr Kessels | Drupal services www.webschuur.com ]



More information about the drupal-devel mailing list