[drupal-devel] prune tables

puregin puregin at puregin.org
Tue May 10 23:54:14 UTC 2005

On 10 May 2005, at 3:41 PM, Gerhard Killesreiter wrote:

> On Wed, 11 May 2005, Dries Buytaert wrote:
>> 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?
> I am not too fond of the idea. Admins don't want statistics over 
> number of
> sql data rows but over time.
> What I'd rather see is more than one watchdog / accesslog table.
> There would be a small "current" table. When it has reached maybe 500
> entries, those get moved to a big backup table and the current table 
> gets
> pruned. This could be done by cron. This would require locking, I 
> think.
> Which advantages does that have?
> - We work with a small table on normal page views. Inserts are fast.
> - We still have all the data we want on admin pages.
> Cheers,
> 	Gerhard

We could use use 'Merge tables'  in MySQL (and have the same 
functionality with
views in PostgreSQL)...  keeping logs is exactly the kind of scenario
these were designed for.

      The 'con' is that this is pretty database specific...


More information about the drupal-devel mailing list