We've had our customer's site online for just over 4 months and we are experiencing serious performance issues (sometimes the site is simply no longer responsive). We've identified 3 tables which might be part of to the culprit: advert_impressions (42M rows) advert_imp_visitor_details (41M rows) activity_log (12M rows) Every month we have to run some script to archive data and we are doing this without really knowing the overall impact to the app. We also had to create a new index on advert_impressions to speed up queries again to mitigate a problem where the site was unresponsive. We ave basically two questions:
- Is there a setting which we would turn off in order to prevent populating these tables?
- If 1 is not possible, is there any side effect if we archive data on a weekly basis? In other terms, are we going to see some features no longer working properly or broken because those tables are archived.
Hello, The three tables you just mentioned are just for logging user activities and website visitor details, so if you think they are not needed you can
- disable activity by adding this to the .env file and then clear config file
2. at Corals/modules/Advert/Classes/Advert.php disable lines 109 ~ 118
$impression = Impression::updateOrCreate([
'session_id' => session()->getId(),
'banner_id' => $banner->id,
'zone_id' => $zone->id,
'page_slug' => request()->headers->get('referer') ?? url()->current(),
'impression_slug' => $bannerSlug,
$impression->visitorDetail()->updateOrCreate(['impression_id' => $impression->id], $this->getVisitorDetails());
Please login or Register to submit your answer