View Full Version : Serious Flaw in GAB

03-09-2009, 04:39 PM
I have been using GAB for a few years now and have over 100 advertisers in my GAB setup and run 2 different ad locations (both horizontal banners) on my site. I have noticed over time that GAB will slow down the site at times, so finally I got my developer to look into it and look into the server logs because recently my site would almost stop functioning for a couple of minutes at a time.

it turns out the something in the Cron job for GAB statistics that was taking place at 20 minutes past the hour was running HUGE queries, for example the log shows over 6.5 MILLION rows examined in one of the queries that was taking a really long time and slowing down the site.

I don't know exactly what is wrong with GAB and its queries but it would appear that over time GAB is going to slow your site down more and more as the statistics get out of hand.

03-09-2009, 06:07 PM
The compress_stats function keeps tracks of the statistics data. If you keep tracking for all time, then the related database table is going to continue to grow so the next GROUP BY query to get the stat totals is going to be bigger than the last. While it is possible to total on each display of an ad, it is not desirable as it adds to the front-end weight, so totaling gets done in a cron. You could set the cron to run more frequently via the ACP -> Scheduled Tasks -> Scheduled Task Manager -> Edit GAB Cron, maybe three or four times a day instead of once, or you can use the ACP -> GAB -> Manage -> 'Deactivate AND Compress (the cron job)' to manually do several times a day what the cron does once a day. If you want to restart your statistics, then you can run the following queries to be rid of all the current stats:

# warning: deletes all statistics data !!!!