KamilCuk Posted May 7, 2023 Share Posted May 7, 2023 I have prestashop PrestaShop™ 1.5.6.2 and I enabled profiling and got the following result: 8224.761 ms SELECT SQL_NO_CACHE SUM(pv.`counter`) AS total_viewed FROM `ps_page_viewed` pv LEFT JOIN `ps_date_range` dr ON pv.`id_date_range` = dr.`id_date_range` LEFT JOIN `ps_page` p ON pv.`id_page` = p.`id_page` LEFT JOIN `ps_page_type` pt ON pt.`id_page_type` = p.`id_page_type` WHERE pt.`name` = 'product' AND dr.`time_start` BETWEEN '2023-05-01 00:00:00' AND '2023-05-31 23:59:59' AND dr.`time_end` BETWEEN '2023-05-01 00:00:00' AND '2023-05-31 23:59:59' AND id_shop IN (1) LIMIT 1 in /srv/www/htdocs/rolki/controllers/admin/AdminHomeController.php:332 39813 rows browsed The query happens inside initContent inside https://github.com/PrestaShop/PrestaShop/blob/1.5.6.2/controllers/admin/AdminHomeController.php#L688 . Is there something I can do to speed this query? Link to comment Share on other sites More sharing options...
Olivier CLEMENCE Posted May 9, 2023 Share Posted May 9, 2023 (edited) Hi, default prestashop statistics module will fullfill your database until it crash ! You have to clear your table in databse (and lost all your stat). It's one of the reason i created my own statistics module here : https://addons.prestashop.com/en/analytics-statistics/90621-opart-stat-reliable-and-useful-ecommerce-statistics.html But it don't work on prestashop 1.5. (It work on 1.6, 1.7 and 8 ) Edited May 9, 2023 by Olivier CLEMENCE (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now