C
C
Chronikus2014-08-17 11:41:22
PHP
Chronikus, 2014-08-17 11:41:22

JoomShopping 4.6.1 admin panel is cut down. How to optimize mysql queries and database?

Good afternoon!
We have:
Joomla 3.3.3 + JoomShopping 4.6.1
Platform: XEN
Processor: Intel(R) Xeon(R) CPU E5620 @ 2.40GHz
Memory: 2048Mb
System: CentOS 6.5
Server API: CGI Apache/2.2.15
Filled 80000 products, front -end works without glitches, administrative part, namely pages with products and categories:
/administrator/index.php?option=com_jshopping&controller=products&category_id=0
/administrator/index.php?option=com_jshopping&controller=categories&catid=0
somewhere around 92000 Thousands of these pages disappear and the server issues: Error 504 gateway time-out. The php settings have already been raised to 1024 memory per script, 90 seconds to execute, 128 mb to download the file.
There is such an unpleasant request in the admin panel:

SELECT pr.product_id, pr.product_publish, pr.`name_ru-RU` as name, pr.`short_description_ru-RU` as short_description, man.`name_ru-RU` as man_name, GROUP_CONCAT(cat.`name_ru-RU` SEPARATOR '<br>') AS namescats, pr.product_ean as ean, pr.product_quantity as qty, pr.image as image, pr.product_price, pr.currency_id, pr.hits, pr.unlimited, pr.product_date_added, pr.label_id  
  FROM `ltqvu_jshopping_products` AS pr 
                      
  LEFT JOIN `ltqvu_jshopping_products_to_categories` AS pr_cat USING (product_id)
                      
  LEFT JOIN `ltqvu_jshopping_categories` AS cat 
  ON pr_cat.category_id=cat.category_id
                      
  LEFT JOIN `ltqvu_jshopping_manufacturers` AS man 
  ON pr.product_manufacturer_id=man.manufacturer_id
                      
                      
  WHERE pr.parent_id=0  
  GROUP BY pr.product_id 
  order by pr.product_id asc  
  LIMIT 0, 92000

... which actually issues a page with a 504 error. At the same time, the front-side of the site works fine, it displays all 92,000 products with full characteristics and pictures.
Question: how to optimize a query or database so that you can continue to work comfortably and the page data does not fly away with an error?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question