SELECT url_to, r404 FROM pod_redirect WHERE BINARY REPLACE(url_from,'/ru/','/') = '/kastryuli/maestro-ringel-risoli.html?pg=4' LIMIT 0,1 [0.00043487548828125 sec]
SELECT pod_filter.id,pod_filter.url FROM pod_filter WHERE BINARY pod_filter.url IN ('maestro','ringel','risoli') order by url [0.0014970302581787 sec]
SELECT pod_sub_icon.id,pod_sub_icon.url FROM pod_sub_icon WHERE BINARY pod_sub_icon.url IN ('maestro','ringel','risoli') order by url [0.0012478828430176 sec]
select id,url from pod_cat_brand where BINARY url = 'maestro-ringel-risoli' [0.0016281604766846 sec]
select id,url from pod_cat_brand where url = 'maestro-ringel-risoli' [0.00023007392883301 sec]
select id,url from pod_cat_brand where url in ('maestro','ringel','risoli') [0.00065803527832031 sec]
SELECT g.id -- основні FROM pod_cat_good g USE INDEX (idx_cat_entry_active_present) WHERE g.cat_id IN (115) AND g.brand_id IN (332,1415,2445) 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 (115) AND g.brand_id IN (332,1415,2445) AND g.is_present_all_mods AND g.entry =0 AND g.is_active [0.096857070922852 sec]
CREATE TEMPORARY TABLE temp_brand_counts_6a2aa21bb7687 ( id INT, gid INT, INDEX idx_id (id), INDEX idx_gid (gid) ) [0.00037813186645508 sec]
INSERT INTO temp_brand_counts_6a2aa21bb7687 (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 (115) 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 (115) 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 (332,1415,2445) [0.011170864105225 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_6a2aa21bb7687 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.0012650489807129 sec]
DROP TEMPORARY TABLE IF EXISTS temp_brand_counts_6a2aa21bb7687 [0.00031900405883789 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 (115) AND g.brand_id IN (332,1415,2445) 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 (115) AND g.brand_id IN (332,1415,2445) 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 (115) AND g.brand_id IN (332,1415,2445) 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 (115) AND g.brand_id IN (332,1415,2445) AND go.is_present AND go.is_active AND g.is_present_all_mods AND g.is_active ) A [0.028937101364136 sec]
SELECT g.id, if(g.is_present and g.price >= '194' and g.price <= '3864',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 >= '194' and g.price <= '3864',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 >= '194' and pcg.price <= '3864' WHERE g.id in (163969,163974,164092,164222,164271,164392,165304,166535,166537,166544,166570,166575,166711,166764,166766,166821,171986,172007,172009,215356,215357,215358,215359,230436,232358,232359,232360,232361,234186,234187,234188,244470,244471,244472,267067,280278,280282,280284,280291,291768,291769,291770,291774,327601,327602,327604,327605,327606,347772,355035,355036,355037,361870,361871,361872,362151,362152,362153,362154,362155,362156,362157,362158,362159,362160,362161,382215,382243,382244,382245,382246,382247,382249,400615,420389,420391,420392,420393,420394,420395,420396,420398,420399,420400,420449,420450,420451,422937,422938,422939,422940,422941,422942,422945,422947,422950,427003,427009,438924,438929,438936,438939,438940,438941,438956,438957,438958,440962,440963,440964,440965,441019,441020,441021,441022,441023,441025,461338,461339,461340,461341,461342,463310,468197,468198,470803,476143,476147,476148,477641,477643,477644,503493) GROUP BY g.id ORDER BY g.ordr desc LIMIT 96, 32 [0.020294904708862 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 >= '194' and g.price <= '3864',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 >= '194' and g.price <= '3864',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 >= '194' and pcg.price <= '3864') WHERE g.id in (422947,438924,438940,438958,440965,441022,461339,463310,476143,477643,166575,166821,280278,291768,327601,327606,355037,362151,362155,362159,382243,382247,420391,420395,420400,422937,422941,422950,438929,438941,440962,441019) GROUP BY g.id ORDER BY g.ordr desc [0.0047240257263184 sec]