-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 04/25/2008 06:32 PM, listmail wrote:
| I noticed that the AWL database was getting rather large, so I used the
| check_whitelist script to remove the stale entries. While this seems
to have
| removed a lot of entries from the database, it did not reduce the
database size.
|
| Does anyone know what kind of a database this is, and in particular,
how to do
| a cleanup that will remove unused records? The database is currently
located
| on a RAM drive, so space is important due to scarcity as well as the
potential
| speed issues from letting it grow too large.
|

I use MySQL for the AWL database and added a timestamp, "lastupdate"
column to the table.  I then have a script that runs every night:

DELETE FROM awl WHERE lastupdate <= DATE_SUB(SYSDATE(), INTERVAL 2 MONTH);
DELETE FROM awl WHERE count = 1 AND lastupdate <= DATE_SUB(SYSDATE(),
INTERVAL 1
5 DAY);



- --

~  Steve
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFIEm3seERILVgMyvARAsADAJ9F+lgHlIkzP6Ny91FzR7F1xbt81wCfTeTn
SDK/TIP6FKhcpCXIBHNMrNk=
=Tvf1
-----END PGP SIGNATURE-----

Reply via email to