My site bases on zen cart E-commence template, it has 20,000 products now , but it become slower and slower. How can I do?
I have the same problem with you.
I searched the answer from google. Most of them tell me to close the manufacture module of sidebox, and close the counter display of categories and so on. Then I try them all. But my website is still slow. My problem is that the more products are, the slower my website is.
I set the variable: long_query_time = 1 in mysql. Then I found that there are four sql queries which are very slow. Because them select all products every time when you open the website. I located them in four files:
such as :
$random_whats_new_sidebox_product_query = "select p.products_id, p.products_image, p.products_tax_class_id, p.products_price, pd.products_name,
from (" . TABLE_PRODUCTS . " p
left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id )
where p.products_id = pd.products_id
and pd.language_id = ‘" . (int)$_SESSION['languages_id'] . "’
and p.products_status = 1 " . $display_limit;
the value of variable $display_limit here is NULL, but it should be "limit 0,30", so I set $display_limit= "limit 0,30"; before this line. I speed up my website( http://www.usa-laptop-screen.com) successfully!