[Mailman-Developers] MySQL adaptor - storing in a remote database -ping times

Mark Sapiro mark at msapiro.net
Fri Aug 13 03:10:52 CEST 2010


Aaron Kreider wrote:

>  I'm using the MySQL adaptor and am wondering whether it is acceptable 
>to have the database in a remote location with a 30 ms ping time between 
>it and the server that runs mailman? We'd be running medium sized lists 
>of 100-300 subscribers.  It depends on whether the MySQL adaptor will do 
>a couple queries to send out an email, or if it does a query for every 
>single subscriber (in which case a ping time of 30 ms is unacceptable).


The CalcRecips.py handler does the following:

    recips = [mlist.getMemberCPAddress(m)
              for m in mlist.getRegularMemberKeys()
              if mlist.getDeliveryStatus(m) == ENABLED]

This means that it calls getRegularMemberKeys() which results in one
database query to get the addresses of all regular members, and then
for each regular member, it calls getDeliveryStatus() and then for
each regular member with delivery enabled, it calls
getMemberCPAddress().

There is some caching within MysqlMemberships.py, which I think results
in the call to getDeliveryStatus() doing a database query for "all"
attributes and caching the result, so the call to getMemberCPAddress()
is essentially free, but there is still a query for each regular
member.

-- 
Mark Sapiro <mark at msapiro.net>        The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan



More information about the Mailman-Developers mailing list