SELECT url_to, r404
FROM pod_redirect
WHERE BINARY REPLACE(url_from,'/ru/','/') = '/14_fevralya/maestro-class-ellen-devays_maker-ardesto-tescoma.html' LIMIT 0,1 [0.00071597099304199 sec]
SELECT pod_filter.id,pod_filter.url FROM pod_filter WHERE BINARY pod_filter.url IN ('maestro','class','ellen','devays_maker','ardesto','tescoma') order by url [0.0020909309387207 sec]
SELECT pod_sub_icon.id,pod_sub_icon.url FROM pod_sub_icon WHERE BINARY pod_sub_icon.url IN ('maestro','class','ellen','devays_maker','ardesto','tescoma') order by url [0.0012528896331787 sec]
select id,url from pod_cat_brand where BINARY url = 'maestro-class-ellen-devays_maker-ardesto-tescoma' [0.0018379688262939 sec]
select id,url from pod_cat_brand where url = 'maestro-class-ellen-devays_maker-ardesto-tescoma' [0.00041007995605469 sec]
select id,url from pod_cat_brand where url in ('maestro','class','ellen','devays_maker','ardesto','tescoma') [0.0010049343109131 sec]
SELECT g.id -- основні
FROM pod_cat_good g USE INDEX (idx_cat_entry_active_present)
WHERE g.cat_id IN (883,884,885,886,887,1165,1163,1166,2172,2173,888,889,1167,1375) AND
g.brand_id IN (1717,826,1405,1152,332,1984) 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 (883,884,885,886,887,1165,1163,1166,2172,2173,888,889,1167,1375) AND
g.brand_id IN (1717,826,1405,1152,332,1984) AND
g.is_present_all_mods AND g.entry =0 AND g.is_active
[0.042078971862793 sec]
CREATE TEMPORARY TABLE temp_brand_counts_6a2aa21c1d099 (
id INT,
gid INT,
INDEX idx_id (id),
INDEX idx_gid (gid)
) [0.00049400329589844 sec]
INSERT INTO temp_brand_counts_6a2aa21c1d099 (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 (883,884,885,886,887,1165,1163,1166,2172,2173,888,889,1167,1375) 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 (883,884,885,886,887,1165,1163,1166,2172,2173,888,889,1167,1375) 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 (1717,826,1405,1152,332,1984) [0.19146585464478 sec]
SELECT b.id, b.name AS name, pc.name 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_6a2aa21c1d099
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.00211501121521 sec]
DROP TEMPORARY TABLE IF EXISTS temp_brand_counts_6a2aa21c1d099 [0.00024700164794922 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 (883,884,885,886,887,1165,1163,1166,2172,2173,888,889,1167,1375) AND
g.brand_id IN (1717,826,1405,1152,332,1984) 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 (883,884,885,886,887,1165,1163,1166,2172,2173,888,889,1167,1375) AND
g.brand_id IN (1717,826,1405,1152,332,1984) 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 (883,884,885,886,887,1165,1163,1166,2172,2173,888,889,1167,1375) AND
g.brand_id IN (1717,826,1405,1152,332,1984) 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 (883,884,885,886,887,1165,1163,1166,2172,2173,888,889,1167,1375) AND
g.brand_id IN (1717,826,1405,1152,332,1984) AND
go.is_present AND go.is_active AND g.is_present_all_mods AND g.is_active
) A
[0.090238094329834 sec]
SELECT g.id, if(g.is_present and g.price >= '75' and g.price <= '2465',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 >= '75' and g.price <= '2465',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 >= '75' and pcg.price <= '2465' WHERE g.id in (296715,301156,327457,339706,409201,424877,434518,459243,459251,465235,465240,465253,465721,466021,466029,468469,468470,468471,468472,468473,469902,469929,469930,469931,469935,469937,470167,470175,470324,470325,470326,470327,470328,470329,470332,470333,470335,470336,470337,470338,470340,470401,470402,470445,470446,470452,470453,470454,470457,470458,470464,470465,470468,503970,503973,503974,503975,440046,500899,508813,508818,508902,508905,508909,508914,508944,508982,508988,508989,508990,508991,345743,345747,345750,345753,345756,345762,345766,345771,345774,383308,444403,444463,444481,444491,444670,466159,466161,466166,409204,444381,444593,444640,447215,453553)
GROUP BY g.id
ORDER BY g.ordr desc
LIMIT 0, 32 [0.0041720867156982 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 AS name, g.name2 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 AS brand_name,b.url as burl,b.id as bid, b.country AS brand_country,c.url as curl, c.name AS cat_name,
si.name AS sub_icon_name,si.icon AS sub_icon,
g.star, g.comment_id, if(g.is_present and g.price >= '75' and g.price <= '2465',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 >= '75' and g.price <= '2465',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 >= '75' and pcg.price <= '2465')
WHERE g.id in (508982,503970,468472,508818,503974,503973,469930,500899,468470,459251,409204,409201,470465,466021,453553,459243,470325,465721,434518,383308,296715,345743,345756,345774,424877,444403,444593,465240,466029,468469,468473,469931)
GROUP BY g.id
ORDER BY g.ordr desc [0.0017359256744385 sec]