Fixing the Extreme Load Time When Creating a New Product in PrestaShop 1.7.8.10: A Simple Code Replacement to Avoid a Heavy SQL Query That Slows Down Everything
Fixing the Extreme Load Time When Creating a New Product in PrestaShop 1.7.8.10: A Simple Code Replacement to Avoid a Heavy SQL Query That Slows Down Everything If you are running PrestaShop 1.7.8.10 and you have a database with a huge number of products, let’s say 600,000 products or more, and you try to add a new product in the Back Office, but suddenly you notice that your SQL server is under extreme load and everything slows down to the point that the new product page takes forever to open, then you might be facing a serious issue caused by a badly written SQL query, a query that someone thought was a great idea but in reality, it is causing massive performance problems by trying to determine the most used tax rule group by scanning the entire database in an extremely inefficient way, a method that simply does not scale when dealing with large product databases, and the worst part is that this query is executed every single time you try to open the product creation page, making the experience painfully slow and completely unacceptable for any serious e-commerce store running a large catalog. 🔎 Understanding the Problem: The Query