BenW Posted January 6, 2022 Share Posted January 6, 2022 (edited) Hi there, Our website got pretty slow after importing 1000+ cart rules (based on category + shipping method). After enabling profiling, we can see about 1000 queries for carte rules on the homepage when logged in. If you aren't logged in, everything works fine. By the way, when profiling is on, hooks information are not showing any hooks - read it was normal on 1.7.3, but is there a way to reimplement it ? - I've speeded up the website by deleting unwanted carts from unregistered customers but I'm concerned about the table : - ps_cart_product showing more than 100 000 rows - is it safe to empty it ? or at least those with the field id_address_delivered set to 0 ? Questions : 1) Which table can be cleaned up safely ? I already use this module https://mypresta.eu/modules/administration-tools/database-optimization.html 2) Any optimization possible for the carte rules ? Thanks much Prestashop 1.7.3 on dedicated server Edited January 6, 2022 by BenW (see edit history) Link to comment Share on other sites More sharing options...
Daresh Posted January 6, 2022 Share Posted January 6, 2022 First of all, 1.7.3 is very old and may have many bugs. Profiling was reimplemented in 1.7.8. You can check out the Tidy module to clean up the database. Link to comment Share on other sites More sharing options...
BenW Posted January 7, 2022 Author Share Posted January 7, 2022 Hi @Daresh Thanks, but this is the version I'm currently using with no hassle (appart from those mentioned). Simple question, is it safe to clean the ps_cart_product ? Cheers Link to comment Share on other sites More sharing options...
Prestachamps Posted January 7, 2022 Share Posted January 7, 2022 Hi Ben, There is no quick fix for this, and this is one of PS's major issue! in regards to your question : 1. The information in regards to field id_address_delivered set to 0 can be deleted from ps_cart_product. You could empty the entire table, but you need to understand that all carts will be emptied (not that it would count too much, however some visitors who placed products into carts and left it there, they will need to read it again). Personally I would delete all the information's which are older than 30 days! 2. Delete all expired cart rules- however there is no magical solution there. I presume your add to cart is slow as well!? The add to cart could/can be optimized, but again needs some smart changes Unfortunately as mentioned earlier there is no magical solution for that. Kind regards, Leo 1 Link to comment Share on other sites More sharing options...
BenW Posted January 7, 2022 Author Share Posted January 7, 2022 (edited) 1 hour ago, Prestachamps said: 1. The information in regards to field id_address_delivered set to 0 can be deleted from ps_cart_product. You could empty the entire table, but you need to understand that all carts will be emptied (not that it would count too much, however some visitors who placed products into carts and left it there, they will need to read it again). Personally I would delete all the information's which are older than 30 days! Yep that sounds good to me, good advice thanks I'll start by emptying old entries and see if there's any changes regarding speed. 2. Delete all expired cart rules- however there is no magical solution there. I presume your add to cart is slow as well!? The add to cart could/can be optimized, but again needs some smart changes That's what I am doing through a little script that I cron run every month Indeed, add to cart is not slow as well, it's slow as HELL ! 😉. If you have any infos, or insights to share I'm all ears. Thanks for your answer ! I'm going to follow your advices. Best regards Edited January 7, 2022 by BenW (see edit history) 1 Link to comment Share on other sites More sharing options...
El Patron Posted January 11, 2022 Share Posted January 11, 2022 quick fix and magic bullet is to get hosting with nvme to database for example https://www.fasthosts.co.uk/dedicated-servers also I ovh had nvme vps systems... then you get someone to tune the mysql config, also follow Leo..he is more fix sfw where I am more hosting, hosting is cheaper than trying to fix the application 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