The main issue we have with huge mailwizz apps is that the campaign_delivery_log table becomes huge (i’ve seen installs with hundred GB’s of data in that table alone) and we use that table to join against when we send the campaigns so that we can see to which subscriber we have to send the emails, filtering the ones that already received the emails.
Joining sql tables is an expensive operation in itself, joining on a table with million records is even more expensive, which leads in the end to slower sending speeds for campaigns.
In order to fix this problem, starting with version 184.108.40.206 we have introduced an option that if enabled, when a campaign starts sending, instead of joining on the campaign_delivery_log table, it will actually create a new database table, it will copy all the subscriber ids that it has to sent into this new table, then it will start processing based on this new table.
Each time an email is sent, a record from this new table is removed and in the end, when delivery finishes, the table is removed for good.
Before enabling this method, you have to make sure that all your campaigns have finished sending, otherwise you’ll end up sending duplicate emails. Once all the campaigns have finished sending, you can enable the feature by adding following configuration param in your configuration file:
'send.campaigns.command.useTempQueueTables' => true,
If you’re not sure how to do this, please read this article which explains how to handle configuration params in the app.
After this, start sending a new campaign and watch your database, you should see a new database table added during sending, it will be named: tmp_cmp_queue_X (where X is the campaign ID), and it will be removed when sending finishes.