As you know the module Advanced statistics is very slowly but it's required for Bestsellers module.
I'd recommend you new method of "real" Bestsellers, based on purchases statistics, not views statistics.
Open file /modules/Bestsellers/bestsellers.php and remove all lines between
Code:
if (!defined('XCART_SESSION_START')) { header("Location: ../../"); die("Access denied"); }
and
Code:
$smarty->assign("bestsellers", $bestsellers);
So insert between these lines next code:
Code:
$tm = time();
if ($cat)
$cat_limit = "pc.categoryid = '$cat' and";
if (!$config[Bestsellers][number_of_bestsellers] || $config[Bestsellers][number_of_bestsellers] < 0)
$config[Bestsellers][number_of_bestsellers] = 0;
$bestsellers = func_query("select distinct p.*, pr.price as taxed_price, (($tm-p.add_date)) as adddate from $sql_tbl[products] p inner join $sql_tbl[products_categories] pc on pc.productid = p.productid left join $sql_tbl[pricing] pr on pr.productid = p.productid where $cat_limit p.forsale='Y' and (($tm-p.add_date)/86400)<3 and p.avail > 0 order by add_date desc limit ".$config[Bestsellers][number_of_bestsellers]);
Currently this code select bestsellers which add less that 3 days. You can change it in query, find (($tm-p.add_date)/86400)<3 and change number 3 to another period in days.
It's fast and effective method of bestsellers' selection without heavy Advanced statistics module enabled and heavy queries used.
I've make small changes without testing so if you will have any problems please don't hesitate to ask any questions.