Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
  • Sign Up

Помогите с оптимизацией БД


Recommended Posts

Собственно проблема в том что магазин где 30 тис товаров туго грузиться

В админке хоста куча медленных запросов, и все типа:

SELECT
            `a`.`attribute_id`,
            REPLACE(REPLACE(TRIM(pa.text), '
', ''), '
', '') AS `txt`,
            `ad`.`name`,
            `ad`.`mf_tooltip` AS `tooltip`,
            `agd`.`name` AS `gname`,
            `agd`.`attribute_group_id`
         FROM
            `oc_product` AS `p`
         INNER JOIN
            `oc_product_to_store` AS `pts`
         ON
            `p`.`product_id` = `pts`.`product_id` AND `pts`.`store_id` = 0
         INNER JOIN
            `oc_product_attribute` AS `pa`
         ON
            `p`.`product_id` = `pa`.`product_id` AND `pa`.`language_id` = 1
         INNER JOIN
            `oc_attribute` AS `a`
         ON
            `a`.`attribute_id` = `pa`.`attribute_id`
         INNER JOIN
            `oc_attribute_description` AS `ad`
         ON
            `ad`.`attribute_id` = `a`.`attribute_id` AND `ad`.`language_id` = 1
         INNER JOIN
            `oc_attribute_group` AS `ag`
         ON
            `ag`.`attribute_group_id` = `a`.`attribute_group_id`
         INNER JOIN
            `oc_attribute_group_description` AS `agd`
         ON
            `agd`.`attribute_group_id` = `ag`.`attribute_group_id` AND `agd`.`language_id` = 1
 
         INNER JOIN
            `oc_product_to_category` AS `p2c`
         ON
            `p2c`.`product_id` = `p`.`product_id`
 
         WHERE
            `p`.`date_available` <= NOW() AND `p`.`status` = '1' AND `p2c`.`category_id` IN(708)
         GROUP BY
            `txt`, `pa`.`attribute_id`
         HAVING 
            `txt` != ''
         ORDER BY
            `txt`

Буду благодарен за любую помощь! 

БАза.png

Link to post
Share on other sites

Обратитесь к автору Mega Filter

 

Link to post
Share on other sites

  • 3 weeks later...

Актуально! Нужен человек для полной оптимизации сайта за $

Edited by Sacredscorpion
Link to post
Share on other sites

отключите фильтр и смотрите изменение скорости, эти запросы может и самые медленные, но их может быть единицы

а те что в 2-3 раза быстрее тех сотни

Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...

Important Information

On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice.