SELECT url_to, r404 FROM pod_redirect WHERE BINARY REPLACE(url_from,'/ru/','/') = '/ranfors/cotton_box-ipexi-diva.html' LIMIT 0,1 [0.00057315826416016 sec]
SELECT pod_filter.id,pod_filter.url FROM pod_filter WHERE BINARY pod_filter.url IN ('cotton_box','ipexi','diva') order by url [0.0016348361968994 sec]
SELECT pod_sub_icon.id,pod_sub_icon.url FROM pod_sub_icon WHERE BINARY pod_sub_icon.url IN ('cotton_box','ipexi','diva') order by url [0.0011970996856689 sec]
select id,url from pod_cat_brand where BINARY url = 'cotton_box-ipexi-diva' [0.0017800331115723 sec]
select id,url from pod_cat_brand where url = 'cotton_box-ipexi-diva' [0.0005180835723877 sec]
select id,url from pod_cat_brand where url in ('cotton_box','ipexi','diva') [0.00069212913513184 sec]
SELECT g.id -- основні FROM pod_cat_good g USE INDEX (idx_cat_entry_active_present) WHERE g.cat_id IN (202) AND g.brand_id IN (501,2134,1895) AND g.is_present_all_mods AND g.entry =0 AND g.is_active UNION SELECT g.id -- основні в допкатегорії FROM pod_cat_good g INNER JOIN pod_dop_cat_category dc ON dc.good_id = g.id WHERE dc.dop_cat_id IN (202) AND g.brand_id IN (501,2134,1895) AND g.is_present_all_mods AND g.entry =0 AND g.is_active [0.16107201576233 sec]
CREATE TEMPORARY TABLE temp_brand_counts_6a2aa233b1859 ( id INT, gid INT, INDEX idx_id (id), INDEX idx_gid (gid) ) [0.00089812278747559 sec]
INSERT INTO temp_brand_counts_6a2aa233b1859 (id, gid) SELECT g.brand_id AS id, g.id AS gid -- основні FROM pod_cat_good g USE INDEX (idx_cat_entry_active_present) WHERE g.cat_id IN (202) AND g.is_present_all_mods AND g.entry =0 AND g.is_active UNION SELECT g.brand_id AS id, g.id AS gid -- основні в допкатегорії FROM pod_cat_good g INNER JOIN pod_dop_cat_category dc ON dc.good_id = g.id WHERE dc.dop_cat_id IN (202) AND g.is_present_all_mods AND g.entry =0 AND g.is_active UNION SELECT id, null gid FROM pod_cat_category WHERE id in (501,2134,1895) [0.012800216674805 sec]
SELECT b.id, b.name_ua AS name, pc.name_ua AS country, b.country_id, b.image_icon, b.url, b.ordr, pc.code, COALESCE(tc.count, 0) as count FROM pod_cat_brand b INNER JOIN ( SELECT id, COUNT(gid) as count FROM temp_brand_counts_6a2aa233b1859 GROUP BY id HAVING COUNT(gid) > 0 ) tc ON b.id = tc.id LEFT JOIN pod_country pc ON (pc.id = b.country_id AND pc.is_active = 1) WHERE b.is_active = '1' ORDER BY b.ordr [0.0014398097991943 sec]
DROP TEMPORARY TABLE IF EXISTS temp_brand_counts_6a2aa233b1859 [0.00022697448730469 sec]
SELECT MIN(min_price) AS min_price, MAX(max_price) AS max_price FROM ( SELECT MIN(g.price) AS min_price, MAX(g.price) AS max_price -- основні FROM pod_cat_good g USE INDEX (idx_cat_entry_active_present) WHERE g.cat_id IN (202) AND g.brand_id IN (501,2134,1895) AND g.is_present AND g.is_present_all_mods AND g.entry =0 AND g.is_active UNION SELECT MIN(g.price) AS min_price, MAX(g.price) AS max_price -- основні в допкатегорії FROM pod_cat_good g INNER JOIN pod_dop_cat_category dc ON dc.good_id = g.id WHERE dc.dop_cat_id IN (202) AND g.brand_id IN (501,2134,1895) AND g.is_present AND g.is_present_all_mods AND g.entry =0 AND g.is_active UNION SELECT MIN(go.price) AS min_price, MAX(go.price) AS max_price -- підтовари FROM pod_cat_good go INNER JOIN pod_cat_good g ON go.entry = g.id WHERE g.cat_id IN (202) AND g.brand_id IN (501,2134,1895) AND go.is_present AND go.is_active AND g.is_present_all_mods AND g.is_active UNION SELECT MIN(go.price) AS min_price, MAX(go.price) AS max_price -- підтовари в допкатегорії FROM pod_cat_good go INNER JOIN pod_cat_good g ON go.entry = g.id INNER JOIN pod_dop_cat_category dc ON dc.good_id = g.id WHERE dc.dop_cat_id IN (202) AND g.brand_id IN (501,2134,1895) AND go.is_present AND go.is_active AND g.is_present_all_mods AND g.is_active ) A [0.042122840881348 sec]
SELECT g.id, if(g.is_present and g.price >= '955' and g.price <= '3788',least(g.price,ifnull(min(pcg.price),g.price)),ifnull(min(pcg.price),g.price)) min_sort_price , if(g.is_present and g.price >= '955' and g.price <= '3788',greatest(g.price,ifnull(max(pcg.price),g.price)),ifnull(max(pcg.price),g.price)) max_sort_price FROM pod_cat_good g LEFT JOIN pod_cat_good pcg ON pcg.entry=g.id and pcg.is_present=1 and pcg.is_present=1 and pcg.price >= '955' and pcg.price <= '3788' WHERE g.id in (83299,138235,176615,188854,264191,264196,264201,273306,292784,292785,292786,309877,309895,309904,309906,317179,334856,339779,339791,339795,344440,349883,349884,352044,352050,352400,370039,376194,376196,376197,376203,376682,376685,376688,376689,376692,418005,418009,418015,418017,418336,418339,418341,418343,418344,418346,418347,418348,435465,435468,490843,490844,490845,490846,490847,490848,490849,490850,490852,490854,490855,490856,490857,490858,490859,490862,490863,490864,490865,490866) GROUP BY g.id ORDER BY g.ordr desc LIMIT 0, 32 [0.0061531066894531 sec]
SELECT g.video, g.threedvideo, g.is_xit, g.is_action, g.is_sale, g.sub_is_action, g.is_new, g.is_pay_for_video, g.id, g.cat_id, g.name_ua AS name, g.name2_ua AS name2, g.descr, g.size_table, g.artikul, g.image_small, g.image_big, g.price, g.old_price, g.is_present, g.is_present_all_mods, g.sub_icon_id,g.url,g.ordr, g.last_items, g.fast_delivery, g.free_delivery, g.gift, g.timer, g.action_validity, b.name_ua AS brand_name,b.url as burl,b.id as bid, b.country AS brand_country,c.url as curl, c.name_ua AS cat_name, si.name_ua AS sub_icon_name,si.icon AS sub_icon, g.star, g.comment_id, if(g.is_present and g.price >= '955' and g.price <= '3788',least(g.price,ifnull(min(pcg.price),g.price)),ifnull(min(pcg.price),g.price)) as min_sort_price, if(g.is_present and g.price >= '955' and g.price <= '3788',greatest(g.price,ifnull(max(pcg.price),g.price)),ifnull(max(pcg.price),g.price)) as max_sort_price FROM pod_cat_good g INNER JOIN pod_cat_category c ON c.id=g.cat_id LEFT JOIN pod_cat_brand b ON b.id=g.brand_id LEFT JOIN pod_sub_icon si ON si.id=g.sub_icon_id LEFT JOIN pod_cat_good pcg ON (pcg.entry=g.id and pcg.is_present=1 and pcg.price >= '955' and pcg.price <= '3788') WHERE g.id in (334856,273306,309895,344440,83299,376685,376688,352044,376194,264191,309877,292784,292785,292786,176615,188854,339779,138235,376197,370039,376692,309906,352050,349884,349883,352400,317179,339791,376682,376689,264201,376203) GROUP BY g.id ORDER BY g.ordr desc [0.0032792091369629 sec]