Исправить три медленных запроса к mysql
Есть три чудо запроса к базе в самописной cms на php
6,31 секунды, но этот запрос судя по всему касается только поиска
[code]
SELECT SQL_CALC_FOUND_ROWS res.id, res.id_parent, res.name, res.img_title, res.static_link, pr.price_1, fd.value_field FROM scms_resources AS resJOIN scms_price_list AS pr ON res.price_list_code=pr.price_list_code
JOIN scms_resources_fields_data AS fd ON res.id=fd.id_resources
WHERE res.id_service=7 AND res.id_vid=9 AND res.id_public<>0 AND fd.id_res_fields=28 AND res.delete_date IS NULL AND (res.name LIKE '%обувная полка%' OR res.name LIKE '%обувная полка%') LIMIT 500
[/code]
0,2 секунды этот более важен, судя по всему касается именно выборки по товарам, больше всего тормозят именно категории товаров и сами товары, обычные страницы сайта грузятся хорошо
[code]
SELECT DISTINCT a.id FROM scms_resources a LEFT JOIN scms_resources_cache z ON z.id_resource = a.id, scms_resources_fields_data b, scms_resources_fields c, scms_services_vid services WHERE a.id IS NOT NULL AND a.name <> 'index' AND services.id = a.id_service AND a.delete_user = 0 AND a.delete_date IS NULL AND a.id_public = 1 AND a.public_date <= NOW() AND a.id_vid IN (9) AND a.id_service IN (7) AND a.id_public = 1 AND b.id_resources = a.id AND b.id_res_fields = c.id AND b.value_field = '1' AND c.settings LIKE '%<alias>meta.fProductNew#</alias>%' ORDER BY a.public_date DESC, a.id DESC LIMIT 10
[/code]
0,12 секунды привожу часть запроса, сильно длинный:
[code]
INSERT INTO `scms_resources_fields_data` VALUES (357101,7,10004,178,195,9,'','2017-08-23 17:45:34',3,'2018-09-07 14:30:36',3,NULL,0),(357102,7,10004,179,196,9,'','2017-08-23 17:45:34',3,'2018-09-07 14:30:36',3,NULL,0),(357103,7,10004,180,197,9,'','2017-08-23 17:45:34',3,'2018-09-07 14:30:36',3,NULL,0),(357104,7,10004,181,198,9,'','2017-08-23 17:45:34',3,'2018-09-07 14:30:36',3,NULL,0),(357105,7,10004,182,199,9,'','2017-08-23 17:45:34',3,'2018-09-07 14:30:36',3,NULL,0),(357106,7,10004,183,200,9,'','2017-08-23 17:45:34',3,'2018-09-07 14:30:36',3,NULL,0),(357107,7,10004,184,201,9,'','2017-08-23 17:45:34',3,'2018-09-07 14:30:36',3,NULL,0),(357108,7,10004,185,202,9,'','2017-08-23 17:45:34',3,'2018-09-07 14:30:36',3,NULL,0),(357109,7,10004,186,203,9,'','2017-08-23 17:45:34',3,'2018-09-07 14:30:36',3,NULL,0),(357110,7,10004,187,204,9,'','2017-08-23 17:45:34',3,'2018-09-07 14:30:36',3,NULL,0),(357111,7,10004,188,205,9,'','2017-08-23 17:45:34',3,'2018-09-07 14:30:36',3,NULL,0),(357112,7,10004,189,206,9,'','2017-08-23 17:45:34',3,'2018-09-07 14:30:36',3,NULL,0),(357113,7,10004,190,207,9,'','2017-08-23 17:45:34',3,'2018-09-07 14:30:36',3,NULL,0),
[/code]
Current freelance projects in the category Databases & SQL
Refinement of 1C UT 11 for Zebra TSD (RDP): different sound signals when scanning
22 USD
Configuration: 1C UT 11 Address warehouse Zebra TC26 TSD Work via RDP Product scanning is performed in receiving, placement, picking documents, and other warehouse operations. Current problem: Warehouse workers operate through the Zebra TSD. When scanning, they do not always… C#, Databases & SQL ∙ 1 day 9 hours back ∙ 5 proposals |
Heal the 1C configuration
111 USD
Configuration of CRM & ERP SmartCeiling (2.8.26.0) Protection via Registration Code. Registered until the end of the year. Databases & SQL ∙ 2 days back ∙ 8 proposals |
Need a 1C specialist for refinements and development.I am looking for a 1C specialist for freelance collaboration. I am currently working with a contractor who provides support and maintenance for the 1C system. However, due to the contractor's workload, there is a need for prompt execution of additional tasks, improvements, and… Databases & SQL ∙ 6 days 23 hours back ∙ 12 proposals |
Restoring Instagram after a banOn March 3, 2026, my Instagram was blocked due to a violation of rules. I believe there has been some mistake, as the page was personal with photos and videos of my personal trips. I did not post any comments anywhere. I have sent several appeals. I cannot download my files… Databases & SQL, Web Programming ∙ 7 days 11 hours back ∙ 6 proposals |
Eliminate the issue of incomplete data import from Excel files of Nova Poshta specifications into 1C:
45 USD
Goal: There is a processing in 1C for uploading the specifications of Nova Poshta. For unclear reasons, it has stopped loading some tabular data. We need to find the reason and eliminate the problem of incomplete data import from Excel files of Nova Poshta specifications into… System & Network Administration, Databases & SQL ∙ 10 days 18 hours back ∙ 16 proposals |