Where is this query being executed?

Lakjin

Active Member
My delivery_log_archive is very large and I don't want MailWizz touching it on a regular basis. So, where is the following query run? I will disable it:

SELECT DISTINCT(DATE(t.date_added)) AS date_added, `t`.`log_id` AS `t0_c0` FROM `campaign_delivery_log_archive` `t` INNER JOIN `list_subscriber` `subscriber` ON (`t`.`subscriber_id`=`subscriber`.`subscriber_id`) INNER JOIN `mw_list` `list` ON (`subscriber`.`list_id`=`list`.`list_id`) WHERE (DATE(t.date_added) >= DATE_ADD(LAST_DAY(DATE_SUB(NOW(), INTERVAL 3 MONTH)), INTERVAL 1 DAY)) AND (list.list_id = 3) GROUP BY MONTH(t.date_added) ORDER BY t.date_added ASC LIMIT 3

Thanks!
 
I've snipped it in apps/backend/controllers/DashboardController.php and can't find a DashboardController.php in apps/frontend/controllers/DashboardController.php. The query is still happening, though.
 
The file is apps/backend/controllers/DashboardController.php but don't expect to see a raw query, rather you'll see ActiveRecord creating it.
 
The file is apps/backend/controllers/DashboardController.php but don't expect to see a raw query, rather you'll see ActiveRecord creating it.
I've replace...

$cdlModel = !CampaignDeliveryLog::getArchiveEnabled() ? CampaignDeliveryLog::model() : CampaignDeliveryLogArchive::model();

With this...

$cdlModel = CampaignDeliveryLog::model();

But the query still runs. Any idea what is up?
 
I think I found it:

apps/customer/controllers/ListsController.php

//$models = CampaignDeliveryLogArchive::model()->findAll($criteria);
$models = CampaignDeliveryLog::model()->findAll($criteria);

//$count = CampaignDeliveryLogArchive::model()->count($criteria);
$count = CampaignDeliveryLog::model()->count($criteria);

Question. What does apps/customer/components/behaviors/CampaignStatsProcessorBehavior.php do? I see it calling the archive log as well, not sure what it does though.
 
Question. What does apps/customer/components/behaviors/CampaignStatsProcessorBehavior.php do? I see it calling the archive log as well, not sure what it does though.
That's a class that contains common methods to extract stats. Look inside and you'll see it has methods to get opens, clicks and so on ;)
It calls the archive as well, if it is needed.
 
That's a class that contains common methods to extract stats. Look inside and you'll see it has methods to get opens, clicks and so on ;)
It calls the archive as well, if it is needed.
Sorry, what I meant to ask -- when it is used? I don't see any query problems with it calling archive, but in case, I'd like to know if I can disable it without causing problems.

Better question, where is CampaignDeliveryLogArchive::model()? I can simply modify that directly and make it not call archive -- that would solve all problems.
 
Better question, where is CampaignDeliveryLogArchive::model()? I can simply modify that directly and make it not call archive -- that would solve all problems.
You mean where the file is located? It's in apps/common/models
 
Back
Top