SELECT url_to, r404 FROM pod_redirect WHERE BINARY REPLACE(url_from,'/ru/','/') = '/gobelen.html?pg=10' LIMIT 0,1 [0.00047492980957031 sec]
select id,name,url, is_active from pod_cat_category where url = 'gobelen' [0.00034213066101074 sec]
select id from pod_structure where link='catalogue/211' and active='1' AND lang_ru='1' [0.00016093254089355 sec]
SELECT c.id, c.super_category_id, c.entry, c.name AS name, c.title AS cat_title, c.metakwds AS cat_kwds, c.metadesc AS cat_metadesc, c.descr AS cat_descr, cc.name AS parent_name, cc.url AS parent_url, c.url as curl, cc.image AS parent_image, c.seo_text AS seo_text, c.seo_text_mobile AS seo_text_mobile, c.action_text AS action_text, c.view_type, c.is_delivery_custom, c.hide_subcat_sidebar, c.image FROM pod_cat_category c LEFT JOIN pod_cat_category cc ON cc.id=c.entry WHERE c.id='211' [0.00019001960754395 sec]
SELECT id FROM pod_cat_category WHERE entry='211' [0.00031900405883789 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_base_goods; CREATE TEMPORARY TABLE tmp_base_goods ( id INT NOT NULL PRIMARY KEY, brand_id INT, price DECIMAL(10,2), old_price DECIMAL(10,2), ordr INT, is_present TINYINT(1), sub_icon_id INT, fast_delivery TINYINT(1), is_new TINYINT(1), is_sale TINYINT(1), KEY idx_brand (brand_id) ) ENGINE=MEMORY [0.00025200843811035 sec]
INSERT INTO tmp_base_goods (id, brand_id, price, old_price, ordr, is_present, sub_icon_id, fast_delivery, is_new, is_sale) SELECT g.id, g.brand_id, g.price, g.old_price, g.ordr, g.is_present, g.sub_icon_id, g.fast_delivery, g.is_new, g.is_sale FROM pod_cat_good g WHERE g.cat_id IN (211) AND g.entry=0 AND g.is_active AND g.is_present_all_mods UNION SELECT g.id, g.brand_id, g.price, g.old_price, g.ordr, g.is_present, g.sub_icon_id, g.fast_delivery, g.is_new, g.is_sale FROM pod_cat_good g INNER JOIN pod_dop_cat_category dc ON dc.good_id = g.id WHERE dc.dop_cat_id IN (211) AND g.entry=0 AND g.is_active AND g.is_present_all_mods [0.0035271644592285 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_sub_goods; CREATE TEMPORARY TABLE tmp_sub_goods ( id INT NOT NULL PRIMARY KEY, entry INT NOT NULL, price DECIMAL(10,2), old_price DECIMAL(10,2), sub_icon_id INT, is_present TINYINT(1), fast_delivery TINYINT(1), is_new TINYINT(1), is_sale TINYINT(1), KEY idx_entry (entry) ) ENGINE=MEMORY [0.0002138614654541 sec]
INSERT INTO tmp_sub_goods (id, entry, price, old_price, sub_icon_id, is_present, fast_delivery, is_new, is_sale) SELECT go.id, go.entry, go.price, go.old_price, go.sub_icon_id, go.is_present, go.fast_delivery, go.is_new, go.is_sale FROM pod_cat_good go INNER JOIN tmp_base_goods t ON go.entry = t.id WHERE go.is_active AND go.is_present [0.00023818016052246 sec]
SELECT COUNT(id) amount FROM ( SELECT g.id /* cats:211 */ FROM tmp_base_goods g WHERE 1 ) A [0.00012588500976562 sec]
CREATE TEMPORARY TABLE temp_brand_counts_6a2af5af45609 ( id INT, gid INT, INDEX idx_id (id), INDEX idx_gid (gid) ) [0.00063300132751465 sec]
INSERT INTO temp_brand_counts_6a2af5af45609 (id, gid) SELECT g.brand_id AS id, g.id AS gid /* cats:211 */ FROM tmp_base_goods g WHERE 1 [0.00010895729064941 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_6a2af5af45609 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.00027298927307129 sec]
DROP TEMPORARY TABLE IF EXISTS temp_brand_counts_6a2af5af45609 [0.00010800361633301 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 /* cats:211 */ FROM tmp_base_goods g WHERE g.is_present AND 1 UNION SELECT MIN(go.price) AS min_price, MAX(go.price) AS max_price /* cats:211 */ FROM tmp_sub_goods go INNER JOIN tmp_base_goods g ON go.entry = g.id WHERE 1 ) A [0.00017786026000977 sec]
SELECT g.id /* cats:211 */,if(g.is_present and g.price >= '0' and g.price <= '99999',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 >= '0' and g.price <= '99999',greatest(g.price,ifnull(max(pcg.price),g.price)),ifnull(max(pcg.price),g.price)) max_sort_price FROM tmp_base_goods g LEFT JOIN pod_cat_good pcg ON pcg.entry=g.id AND pcg.is_present=1 AND pcg.price >= '0' AND pcg.price <= '99999' GROUP BY g.id ORDER BY g.ordr desc LIMIT 288, 32 [0.00082206726074219 sec]