[Mimedefang] Mail::SpamAssassin::BayesStore::SQL databasepersistence.

David F. Skoll dfs at roaringpenguin.com
Wed Jul 20 11:59:20 EDT 2005


Matthew Schumacher wrote:

> It looks like the code is supposed use persistent connections:

That's bogus, though; there are many explicit calls to untie_db
sprinkled in the code.  It might just be a safety check in case
someone calls tie_db twice.

I should also note that there are many problems with the code,
especially because it makes many assumptions about MySQL-like
optimizations.  For example, the code to check if "too many" tokens
will be deleted by an expire run is just plain stupid.
The query to check if it's OK to do the expiry takes about as long as
the actual expiry itself!

The private _get_oldest_token_age function in SQL.pm will also
be dreadfully slow because it does a sequential scan.

IMO, SpamAssassin's SQL.pm module is simply not production code.
It will bog down any site doing a reasonable mail volume.

Regards,

David.



More information about the MIMEDefang mailing list