SELECT url_to, r404
FROM pod_redirect
WHERE BINARY REPLACE(url_from,'/ru/','/') = '/konstruktory_kits/o_10-developing-constructor_sets-same_toy-xtrem_bots.html' LIMIT 0,1 [0.00054693222045898 sec]
SELECT pod_filter.id,pod_filter.url FROM pod_filter WHERE BINARY pod_filter.url IN ('o_10','developing','constructor_sets','same_toy','xtrem_bots') order by url [0.0018541812896729 sec]
SELECT pod_sub_icon.id,pod_sub_icon.url FROM pod_sub_icon WHERE BINARY pod_sub_icon.url IN ('o_10','developing','constructor_sets','same_toy','xtrem_bots') order by url [0.0015659332275391 sec]
select id,url from pod_cat_brand where BINARY url IN ('o_10','developing','constructor_sets','same_toy','xtrem_bots') [0.0024368762969971 sec]
SELECT id, url FROM pod_filter WHERE url IN ('o_10','developing','constructor_sets','same_toy','xtrem_bots') [0.001079797744751 sec]
SELECT id, url FROM pod_sub_icon WHERE url IN ('o_10','developing','constructor_sets','same_toy','xtrem_bots') [0.00096797943115234 sec]
SELECT g.id -- основні
FROM pod_cat_good g
INNER JOIN pod_good_filter gf0 ON g.id = gf0.id_good AND gf0.filter_id_value in (371)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (463,466)
WHERE g.cat_id IN (3297,437,447,446) AND
g.brand_id IN (1600,2460) AND
g.is_present 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
INNER JOIN pod_good_filter gf0 ON g.id = gf0.id_good AND gf0.filter_id_value in (371)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (463,466)
WHERE dc.dop_cat_id IN (3297,437,447,446) AND
g.brand_id IN (1600,2460) AND
g.is_present AND
g.is_present_all_mods AND g.entry =0 AND g.is_active
UNION
SELECT g.id -- підтовари
FROM
pod_cat_good go
INNER JOIN pod_cat_good g ON go.entry = g.id
INNER JOIN pod_good_filter gf0 ON go.id = gf0.id_good AND gf0.filter_id_value in (371)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (463,466)
WHERE g.cat_id IN (3297,437,447,446) AND
g.brand_id IN (1600,2460) AND
go.is_present AND go.is_active AND g.is_present_all_mods AND g.is_active
UNION
SELECT g.id -- підтовари в допкатегорії
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
INNER JOIN pod_good_filter gf0 ON go.id = gf0.id_good AND gf0.filter_id_value in (371)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (463,466)
WHERE dc.dop_cat_id IN (3297,437,447,446) AND
g.brand_id IN (1600,2460) AND
go.is_present AND go.is_active AND g.is_present_all_mods AND g.is_active
[0.066527843475342 sec]
CREATE TEMPORARY TABLE temp_brand_counts_6a2ac16933876 (
id INT,
gid INT,
INDEX idx_id (id),
INDEX idx_gid (gid)
) [0.00045108795166016 sec]
INSERT INTO temp_brand_counts_6a2ac16933876 (id, gid)
SELECT g.brand_id AS id, g.id AS gid -- основні
FROM pod_cat_good g
INNER JOIN pod_good_filter gf0 ON g.id = gf0.id_good AND gf0.filter_id_value in (371)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (463,466)
WHERE g.cat_id IN (3297,437,447,446) AND
g.is_present 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
INNER JOIN pod_good_filter gf0 ON g.id = gf0.id_good AND gf0.filter_id_value in (371)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (463,466)
WHERE dc.dop_cat_id IN (3297,437,447,446) AND
g.is_present 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 go
INNER JOIN pod_cat_good g ON go.entry = g.id
INNER JOIN pod_good_filter gf0 ON go.id = gf0.id_good AND gf0.filter_id_value in (371)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (463,466)
WHERE g.cat_id IN (3297,437,447,446) AND
go.is_present AND go.is_active AND g.is_present_all_mods AND g.is_active
UNION
SELECT g.brand_id AS id, g.id AS gid -- підтовари в допкатегорії
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
INNER JOIN pod_good_filter gf0 ON go.id = gf0.id_good AND gf0.filter_id_value in (371)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (463,466)
WHERE dc.dop_cat_id IN (3297,437,447,446) AND
go.is_present AND go.is_active AND g.is_present_all_mods AND g.is_active
UNION
SELECT id, null gid
FROM pod_cat_category
WHERE id in (1600,2460) [0.14145994186401 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_6a2ac16933876
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.00050187110900879 sec]
DROP TEMPORARY TABLE IF EXISTS temp_brand_counts_6a2ac16933876 [0.00017118453979492 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
INNER JOIN pod_good_filter gf0 ON g.id = gf0.id_good AND gf0.filter_id_value in (371)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (463,466)
WHERE g.cat_id IN (3297,437,447,446) AND
g.brand_id IN (1600,2460) 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
INNER JOIN pod_good_filter gf0 ON g.id = gf0.id_good AND gf0.filter_id_value in (371)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (463,466)
WHERE dc.dop_cat_id IN (3297,437,447,446) AND
g.brand_id IN (1600,2460) 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
INNER JOIN pod_good_filter gf0 ON go.id = gf0.id_good AND gf0.filter_id_value in (371)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (463,466)
WHERE g.cat_id IN (3297,437,447,446) AND
g.brand_id IN (1600,2460) 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
INNER JOIN pod_good_filter gf0 ON go.id = gf0.id_good AND gf0.filter_id_value in (371)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (463,466)
WHERE dc.dop_cat_id IN (3297,437,447,446) AND
g.brand_id IN (1600,2460) AND
go.is_present AND go.is_active AND g.is_present_all_mods AND g.is_active
) A
[0.010863065719604 sec]
SELECT g.id,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 (
SELECT g.id -- основні
FROM pod_cat_good g
INNER JOIN pod_good_filter gf0 ON g.id = gf0.id_good AND gf0.filter_id_value in (371)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (463,466)
WHERE g.cat_id IN (3297,437,447,446) AND
g.brand_id IN (1600,2460) AND
g.is_present 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
INNER JOIN pod_good_filter gf0 ON g.id = gf0.id_good AND gf0.filter_id_value in (371)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (463,466)
WHERE dc.dop_cat_id IN (3297,437,447,446) AND
g.brand_id IN (1600,2460) AND
g.is_present AND
g.is_present_all_mods AND g.entry =0 AND g.is_active
UNION
SELECT g.id -- підтовари
FROM
pod_cat_good go
INNER JOIN pod_cat_good g ON go.entry = g.id
INNER JOIN pod_good_filter gf0 ON go.id = gf0.id_good AND gf0.filter_id_value in (371)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (463,466)
WHERE g.cat_id IN (3297,437,447,446) AND
g.brand_id IN (1600,2460) AND
go.is_present AND go.is_active AND g.is_present_all_mods AND g.is_active
UNION
SELECT g.id -- підтовари в допкатегорії
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
INNER JOIN pod_good_filter gf0 ON go.id = gf0.id_good AND gf0.filter_id_value in (371)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (463,466)
WHERE dc.dop_cat_id IN (3297,437,447,446) AND
g.brand_id IN (1600,2460) AND
go.is_present AND go.is_active AND g.is_present_all_mods AND g.is_active
) a INNER JOIN pod_cat_good g ON a.id = g.id
LEFT JOIN pod_cat_good pcg ON pcg.entry=g.id and pcg.is_present=1 and pcg.is_present=1 and pcg.price >= '0' and pcg.price <= '99999' GROUP BY g.id
ORDER BY g.ordr desc
LIMIT 0, 32 [0.0053119659423828 sec]
SELECT name AS name, url FROM pod_cat_brand WHERE id in (1600,2460) [0.00030207633972168 sec]
SELECT name AS name, url FROM pod_cat_brand WHERE id='1600.2460' [0.00023984909057617 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_i303r3fnds1pinl1gud5354pcp_6a2ac1695c572;
CREATE TEMPORARY TABLE tmp_A_i303r3fnds1pinl1gud5354pcp_6a2ac1695c572 (
id INT NOT NULL,
PRIMARY KEY (id)
) ENGINE=MEMORY; [0.00041985511779785 sec]
INSERT INTO tmp_A_i303r3fnds1pinl1gud5354pcp_6a2ac1695c572 (id) SELECT A.id FROM (
SELECT g.id -- основні
FROM pod_cat_good g
INNER JOIN pod_good_filter gf0 ON g.id = gf0.id_good AND gf0.filter_id_value in (371)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (463,466)
WHERE g.cat_id IN (3297,437,447,446) AND
g.brand_id IN (1600,2460) AND
g.is_present 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
INNER JOIN pod_good_filter gf0 ON g.id = gf0.id_good AND gf0.filter_id_value in (371)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (463,466)
WHERE dc.dop_cat_id IN (3297,437,447,446) AND
g.brand_id IN (1600,2460) AND
g.is_present AND
g.is_present_all_mods AND g.entry =0 AND g.is_active
UNION
SELECT g.id -- підтовари
FROM
pod_cat_good go
INNER JOIN pod_cat_good g ON go.entry = g.id
INNER JOIN pod_good_filter gf0 ON go.id = gf0.id_good AND gf0.filter_id_value in (371)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (463,466)
WHERE g.cat_id IN (3297,437,447,446) AND
g.brand_id IN (1600,2460) AND
go.is_present AND go.is_active AND g.is_present_all_mods AND g.is_active
UNION
SELECT g.id -- підтовари в допкатегорії
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
INNER JOIN pod_good_filter gf0 ON go.id = gf0.id_good AND gf0.filter_id_value in (371)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (463,466)
WHERE dc.dop_cat_id IN (3297,437,447,446) AND
g.brand_id IN (1600,2460) AND
go.is_present AND go.is_active AND g.is_present_all_mods AND g.is_active
) A [0.0042510032653809 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_pairs_i303r3fnds1pinl1gud5354pcp_6a2ac1695c572;
CREATE TEMPORARY TABLE tmp_pairs_i303r3fnds1pinl1gud5354pcp_6a2ac1695c572 (
goods_id INT NOT NULL,
filter_id INT NOT NULL,
PRIMARY KEY (goods_id, filter_id)
) ENGINE=MEMORY; [0.00035810470581055 sec]
INSERT INTO tmp_pairs_i303r3fnds1pinl1gud5354pcp_6a2ac1695c572 (goods_id, filter_id)
SELECT DISTINCT
A.id AS goods_id,
f.id AS filter_id
FROM tmp_A_i303r3fnds1pinl1gud5354pcp_6a2ac1695c572 A
INNER JOIN pod_good_filter gf ON A.id = gf.id_good AND gf.filter_id_value NOT IN (371,463,466)
INNER JOIN pod_cat_filter cf ON gf.filter_id = cf.filter_id AND cf.category_id = 3297
INNER JOIN pod_filter fm ON gf.filter_id = fm.id AND fm.is_split = 0 AND fm.is_active
INNER JOIN pod_filter f ON gf.filter_id_value = f.id AND f.is_active [0.0076680183410645 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_i303r3fnds1pinl1gud5354pcp_6a2ac1695c572;
CREATE TEMPORARY TABLE tmp_counts_i303r3fnds1pinl1gud5354pcp_6a2ac1695c572 (
filter_id INT NOT NULL PRIMARY KEY,
count INT NOT NULL
) ENGINE=MEMORY; [0.00036096572875977 sec]
INSERT IGNORE INTO tmp_counts_i303r3fnds1pinl1gud5354pcp_6a2ac1695c572 (filter_id, count)
SELECT
p.filter_id,
COUNT(*) AS count
FROM tmp_pairs_i303r3fnds1pinl1gud5354pcp_6a2ac1695c572 p
GROUP BY p.filter_id [0.00031304359436035 sec]
SELECT
c.filter_id,
c.count,
f.entry,
f.name AS name,
f.url,
f.ord,
fm.name AS mname,
fm.url AS murl,
fm.ord AS mord
FROM tmp_counts_i303r3fnds1pinl1gud5354pcp_6a2ac1695c572 c
INNER JOIN pod_filter f ON c.filter_id = f.id
INNER JOIN pod_filter fm ON f.entry = fm.id
ORDER BY fm.ord DESC, f.ord DESC, c.filter_id [0.00032687187194824 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_i303r3fnds1pinl1gud5354pcp_6a2ac1695c572 [0.00021505355834961 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_pairs_i303r3fnds1pinl1gud5354pcp_6a2ac1695c572 [0.00010204315185547 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_i303r3fnds1pinl1gud5354pcp_6a2ac1695c572 [9.4890594482422E-5 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_i303r3fnds1pinl1gud5354pcp_6a2ac1696009d;
CREATE TEMPORARY TABLE tmp_A_i303r3fnds1pinl1gud5354pcp_6a2ac1696009d (
id INT NOT NULL,
entry INT NOT NULL,
PRIMARY KEY (id),
KEY idx_entry (entry)
) ENGINE=MEMORY; [0.0003049373626709 sec]
INSERT INTO tmp_A_i303r3fnds1pinl1gud5354pcp_6a2ac1696009d (id, entry) SELECT A.id, A.entry FROM (
SELECT g.id as id, g.id as entry -- основні
FROM pod_cat_good g
INNER JOIN pod_good_filter gf0 ON g.id = gf0.id_good AND gf0.filter_id_value in (371)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (463,466)
WHERE g.cat_id IN (3297,437,447,446) AND
g.brand_id IN (1600,2460) AND
g.is_present AND
g.is_present_all_mods AND g.entry =0 AND g.is_active
UNION
SELECT g.id as id, g.id as entry -- основні в допкатегорії
FROM pod_cat_good g
INNER JOIN pod_dop_cat_category dc ON dc.good_id = g.id
INNER JOIN pod_good_filter gf0 ON g.id = gf0.id_good AND gf0.filter_id_value in (371)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (463,466)
WHERE dc.dop_cat_id IN (3297,437,447,446) AND
g.brand_id IN (1600,2460) AND
g.is_present AND
g.is_present_all_mods AND g.entry =0 AND g.is_active
UNION
SELECT go.id as id, g.id as entry -- підтовари
FROM
pod_cat_good go
INNER JOIN pod_cat_good g ON go.entry = g.id
INNER JOIN pod_good_filter gf0 ON go.id = gf0.id_good AND gf0.filter_id_value in (371)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (463,466)
WHERE g.cat_id IN (3297,437,447,446) AND
g.brand_id IN (1600,2460) AND
go.is_present AND go.is_active AND g.is_present_all_mods AND g.is_active
UNION
SELECT go.id as id, g.id as entry -- підтовари в допкатегорії
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
INNER JOIN pod_good_filter gf0 ON go.id = gf0.id_good AND gf0.filter_id_value in (371)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (463,466)
WHERE dc.dop_cat_id IN (3297,437,447,446) AND
g.brand_id IN (1600,2460) AND
go.is_present AND go.is_active AND g.is_present_all_mods AND g.is_active
) A [0.005040168762207 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_pairs_i303r3fnds1pinl1gud5354pcp_6a2ac1696009d;
CREATE TEMPORARY TABLE tmp_pairs_i303r3fnds1pinl1gud5354pcp_6a2ac1696009d (
goods_id INT NOT NULL,
filter_id INT NOT NULL,
PRIMARY KEY (goods_id, filter_id)
) ENGINE=MEMORY; [0.00035595893859863 sec]
INSERT INTO tmp_pairs_i303r3fnds1pinl1gud5354pcp_6a2ac1696009d (goods_id, filter_id)
SELECT DISTINCT
A.entry AS goods_id,
f.id AS filter_id
FROM tmp_A_i303r3fnds1pinl1gud5354pcp_6a2ac1696009d A
INNER JOIN pod_good_filter gf ON A.id = gf.id_good AND gf.filter_id_value NOT IN (371,463,466)
INNER JOIN pod_cat_filter cf ON gf.filter_id = cf.filter_id AND cf.category_id = 3297
INNER JOIN pod_filter fm ON gf.filter_id = fm.id AND fm.is_split = 1 AND fm.is_active
INNER JOIN pod_filter f ON gf.filter_id_value = f.id AND f.is_active [0.00065922737121582 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_i303r3fnds1pinl1gud5354pcp_6a2ac1696009d;
CREATE TEMPORARY TABLE tmp_counts_i303r3fnds1pinl1gud5354pcp_6a2ac1696009d (
filter_id INT NOT NULL PRIMARY KEY,
count INT NOT NULL
) ENGINE=MEMORY; [0.00029587745666504 sec]
INSERT IGNORE INTO tmp_counts_i303r3fnds1pinl1gud5354pcp_6a2ac1696009d (filter_id, count)
SELECT
p.filter_id,
COUNT(*) AS count
FROM tmp_pairs_i303r3fnds1pinl1gud5354pcp_6a2ac1696009d p
GROUP BY p.filter_id [0.00023698806762695 sec]
SELECT
c.filter_id,
c.count,
f.entry,
f.name AS name,
f.url,
f.ord,
fm.name AS mname,
fm.url AS murl,
fm.ord AS mord
FROM tmp_counts_i303r3fnds1pinl1gud5354pcp_6a2ac1696009d c
INNER JOIN pod_filter f ON c.filter_id = f.id
INNER JOIN pod_filter fm ON f.entry = fm.id
ORDER BY fm.ord DESC, f.ord DESC, c.filter_id [0.00027608871459961 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_i303r3fnds1pinl1gud5354pcp_6a2ac1696009d [0.00022983551025391 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_pairs_i303r3fnds1pinl1gud5354pcp_6a2ac1696009d [0.00010800361633301 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_i303r3fnds1pinl1gud5354pcp_6a2ac1696009d [9.9897384643555E-5 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_i303r3fnds1pinl1gud5354pcp_6a2ac169623f8;
CREATE TEMPORARY TABLE tmp_A_i303r3fnds1pinl1gud5354pcp_6a2ac169623f8 (
id INT NOT NULL,
entry INT NOT NULL,
PRIMARY KEY (id),
KEY idx_entry (entry)
) ENGINE=MEMORY [0.00024294853210449 sec]
INSERT INTO tmp_A_i303r3fnds1pinl1gud5354pcp_6a2ac169623f8 (id, entry) SELECT A.id, A.entry FROM (
SELECT g.id as id, g.id as entry -- основні
FROM pod_cat_good g
INNER JOIN pod_good_filter gf0 ON g.id = gf0.id_good AND gf0.filter_id_value in (463,466)
WHERE g.cat_id IN (3297,437,447,446) AND
g.brand_id IN (1600,2460) AND
g.is_present AND
g.is_present_all_mods AND g.entry =0 AND g.is_active
UNION
SELECT g.id as id, g.id as entry -- основні в допкатегорії
FROM pod_cat_good g
INNER JOIN pod_dop_cat_category dc ON dc.good_id = g.id
INNER JOIN pod_good_filter gf0 ON g.id = gf0.id_good AND gf0.filter_id_value in (463,466)
WHERE dc.dop_cat_id IN (3297,437,447,446) AND
g.brand_id IN (1600,2460) AND
g.is_present AND
g.is_present_all_mods AND g.entry =0 AND g.is_active
UNION
SELECT go.id as id, g.id as entry -- підтовари
FROM
pod_cat_good go
INNER JOIN pod_cat_good g ON go.entry = g.id
INNER JOIN pod_good_filter gf0 ON g.id = gf0.id_good AND gf0.filter_id_value in (463,466)
WHERE g.cat_id IN (3297,437,447,446) AND
g.brand_id IN (1600,2460) AND
go.is_present AND go.is_active AND g.is_present_all_mods AND g.is_active
UNION
SELECT go.id as id, g.id as entry -- підтовари в допкатегорії
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
INNER JOIN pod_good_filter gf0 ON g.id = gf0.id_good AND gf0.filter_id_value in (463,466)
WHERE dc.dop_cat_id IN (3297,437,447,446) AND
g.brand_id IN (1600,2460) AND
go.is_present AND go.is_active AND g.is_present_all_mods AND g.is_active
) A [0.0039968490600586 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_pairs_i303r3fnds1pinl1gud5354pcp_6a2ac169623f8;
CREATE TEMPORARY TABLE tmp_pairs_i303r3fnds1pinl1gud5354pcp_6a2ac169623f8 (
goods_id INT NOT NULL,
filter_id INT NOT NULL,
PRIMARY KEY (goods_id, filter_id)
) ENGINE=MEMORY [0.00051403045654297 sec]
INSERT INTO tmp_pairs_i303r3fnds1pinl1gud5354pcp_6a2ac169623f8 (goods_id, filter_id)
SELECT DISTINCT
A.entry AS goods_id,
f.id AS filter_id
FROM tmp_A_i303r3fnds1pinl1gud5354pcp_6a2ac169623f8 A
INNER JOIN pod_good_filter gf ON A.id = gf.id_good AND gf.filter_id = 262
INNER JOIN pod_filter fm ON gf.filter_id = fm.id AND fm.is_split = 1 AND fm.is_active
INNER JOIN pod_filter f ON gf.filter_id_value = f.id AND f.is_active [0.0035171508789062 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_i303r3fnds1pinl1gud5354pcp_6a2ac169623f8;
CREATE TEMPORARY TABLE tmp_counts_i303r3fnds1pinl1gud5354pcp_6a2ac169623f8 (
filter_id INT NOT NULL PRIMARY KEY,
count INT NOT NULL
) ENGINE=MEMORY [0.00044798851013184 sec]
INSERT INTO tmp_counts_i303r3fnds1pinl1gud5354pcp_6a2ac169623f8 (filter_id, count)
SELECT
p.filter_id,
COUNT(*) AS count
FROM tmp_pairs_i303r3fnds1pinl1gud5354pcp_6a2ac169623f8 p
GROUP BY p.filter_id [0.00040984153747559 sec]
INSERT INTO tmp_counts_i303r3fnds1pinl1gud5354pcp_6a2ac169623f8 (filter_id, count)
SELECT pf.id, 0
FROM pod_filter pf
LEFT JOIN tmp_counts_i303r3fnds1pinl1gud5354pcp_6a2ac169623f8 c ON c.filter_id = pf.id
WHERE pf.id in (371) AND c.filter_id IS NULL [0.00036716461181641 sec]
SELECT
c.filter_id,
c.count,
f.entry,
f.name AS name,
f.url,
f.ord,
fm.name AS mname,
fm.url AS murl,
fm.ord AS mord
FROM tmp_counts_i303r3fnds1pinl1gud5354pcp_6a2ac169623f8 c
INNER JOIN pod_filter f ON c.filter_id = f.id
INNER JOIN pod_filter fm ON f.entry = fm.id
ORDER BY fm.ord DESC, f.ord DESC, c.filter_id [0.00035500526428223 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_i303r3fnds1pinl1gud5354pcp_6a2ac169623f8 [0.00039315223693848 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_pairs_i303r3fnds1pinl1gud5354pcp_6a2ac169623f8 [0.00018000602722168 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_i303r3fnds1pinl1gud5354pcp_6a2ac169623f8 [0.00016188621520996 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_i303r3fnds1pinl1gud5354pcp_6a2ac1696567a;
CREATE TEMPORARY TABLE tmp_A_i303r3fnds1pinl1gud5354pcp_6a2ac1696567a (
id INT NOT NULL,
PRIMARY KEY (id)
) ENGINE=MEMORY; [0.00032401084899902 sec]
INSERT INTO tmp_A_i303r3fnds1pinl1gud5354pcp_6a2ac1696567a (id) SELECT A.id FROM (
SELECT g.id -- основні
FROM pod_cat_good g
INNER JOIN pod_good_filter gf0 ON g.id = gf0.id_good AND gf0.filter_id_value in (371)
WHERE g.cat_id IN (3297,437,447,446) AND
g.brand_id IN (1600,2460) AND
g.is_present 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
INNER JOIN pod_good_filter gf0 ON g.id = gf0.id_good AND gf0.filter_id_value in (371)
WHERE dc.dop_cat_id IN (3297,437,447,446) AND
g.brand_id IN (1600,2460) AND
g.is_present AND
g.is_present_all_mods AND g.entry =0 AND g.is_active
UNION
SELECT g.id -- підтовари
FROM
pod_cat_good go
INNER JOIN pod_cat_good g ON go.entry = g.id
INNER JOIN pod_good_filter gf0 ON go.id = gf0.id_good AND gf0.filter_id_value in (371)
WHERE g.cat_id IN (3297,437,447,446) AND
g.brand_id IN (1600,2460) AND
go.is_present AND go.is_active AND g.is_present_all_mods AND g.is_active
UNION
SELECT g.id -- підтовари в допкатегорії
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
INNER JOIN pod_good_filter gf0 ON go.id = gf0.id_good AND gf0.filter_id_value in (371)
WHERE dc.dop_cat_id IN (3297,437,447,446) AND
g.brand_id IN (1600,2460) AND
go.is_present AND go.is_active AND g.is_present_all_mods AND g.is_active
) A [0.026057004928589 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_pairs_i303r3fnds1pinl1gud5354pcp_6a2ac1696567a;
CREATE TEMPORARY TABLE tmp_pairs_i303r3fnds1pinl1gud5354pcp_6a2ac1696567a (
goods_id INT NOT NULL,
filter_id INT NOT NULL,
PRIMARY KEY (goods_id, filter_id)
) ENGINE=MEMORY; [0.00043487548828125 sec]
INSERT INTO tmp_pairs_i303r3fnds1pinl1gud5354pcp_6a2ac1696567a (goods_id, filter_id)
SELECT DISTINCT
A.id AS goods_id,
f.id AS filter_id
FROM tmp_A_i303r3fnds1pinl1gud5354pcp_6a2ac1696567a A
INNER JOIN pod_good_filter gf ON A.id = gf.id_good AND gf.filter_id = 461
INNER JOIN pod_filter fm ON gf.filter_id = fm.id AND fm.is_split = 0 AND fm.is_active
INNER JOIN pod_filter f ON gf.filter_id_value = f.id AND f.is_active [0.0014758110046387 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_i303r3fnds1pinl1gud5354pcp_6a2ac1696567a;
CREATE TEMPORARY TABLE tmp_counts_i303r3fnds1pinl1gud5354pcp_6a2ac1696567a (
filter_id INT NOT NULL PRIMARY KEY,
count INT NOT NULL
) ENGINE=MEMORY; [0.00037503242492676 sec]
INSERT INTO tmp_counts_i303r3fnds1pinl1gud5354pcp_6a2ac1696567a (filter_id, count)
SELECT
p.filter_id,
COUNT(*) AS count
FROM tmp_pairs_i303r3fnds1pinl1gud5354pcp_6a2ac1696567a p
GROUP BY p.filter_id [0.0003199577331543 sec]
INSERT IGNORE INTO tmp_counts_i303r3fnds1pinl1gud5354pcp_6a2ac1696567a (filter_id, count)
SELECT pf.id, 0
FROM pod_filter pf
LEFT JOIN tmp_counts_i303r3fnds1pinl1gud5354pcp_6a2ac1696567a c ON c.filter_id = pf.id
WHERE pf.id in (463,466) AND c.filter_id IS NULL [0.00039410591125488 sec]
SELECT
c.filter_id,
c.count,
f.entry,
f.name AS name,
f.url,
f.ord,
fm.name AS mname,
fm.url AS murl,
fm.ord AS mord
FROM tmp_counts_i303r3fnds1pinl1gud5354pcp_6a2ac1696567a c
INNER JOIN pod_filter f ON c.filter_id = f.id
INNER JOIN pod_filter fm ON f.entry = fm.id
ORDER BY fm.ord DESC, f.ord DESC, c.filter_id [0.00042891502380371 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_i303r3fnds1pinl1gud5354pcp_6a2ac1696567a [0.00029277801513672 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_pairs_i303r3fnds1pinl1gud5354pcp_6a2ac1696567a [0.00013589859008789 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_i303r3fnds1pinl1gud5354pcp_6a2ac1696567a [0.00015592575073242 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_i303r3fnds1pinl1gud5354pcp_6a2ac1696d12f;
CREATE TEMPORARY TABLE tmp_A_i303r3fnds1pinl1gud5354pcp_6a2ac1696d12f (
entry INT NOT NULL,
sub_icon_id INT NOT NULL,
PRIMARY KEY (entry, sub_icon_id)
) ENGINE=MEMORY; [0.00024914741516113 sec]
INSERT IGNORE INTO tmp_A_i303r3fnds1pinl1gud5354pcp_6a2ac1696d12f (entry, sub_icon_id)
SELECT DISTINCT A.entry, A.sub_icon_id FROM (
SELECT g.id as id, g.id as entry, g.sub_icon_id -- основні
FROM pod_cat_good g
INNER JOIN pod_good_filter gf0 ON g.id = gf0.id_good AND gf0.filter_id_value in (371)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (463,466)
WHERE g.cat_id IN (3297,437,447,446) AND
g.brand_id IN (1600,2460) AND
g.is_present AND
g.is_present_all_mods AND g.entry =0 AND g.is_active
UNION
SELECT g.id as id, g.id as entry, g.sub_icon_id -- основні в допкатегорії
FROM pod_cat_good g
INNER JOIN pod_dop_cat_category dc ON dc.good_id = g.id
INNER JOIN pod_good_filter gf0 ON g.id = gf0.id_good AND gf0.filter_id_value in (371)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (463,466)
WHERE dc.dop_cat_id IN (3297,437,447,446) AND
g.brand_id IN (1600,2460) AND
g.is_present AND
g.is_present_all_mods AND g.entry =0 AND g.is_active
UNION
SELECT go.id as id, g.id as entry, go.sub_icon_id -- підтовари
FROM
pod_cat_good go
INNER JOIN pod_cat_good g ON go.entry = g.id
INNER JOIN pod_good_filter gf0 ON go.id = gf0.id_good AND gf0.filter_id_value in (371)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (463,466)
WHERE g.cat_id IN (3297,437,447,446) AND
g.brand_id IN (1600,2460) AND
go.is_present AND go.is_active AND g.is_present_all_mods AND g.is_active
UNION
SELECT go.id as id, g.id as entry, go.sub_icon_id -- підтовари в допкатегорії
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
INNER JOIN pod_good_filter gf0 ON go.id = gf0.id_good AND gf0.filter_id_value in (371)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (463,466)
WHERE dc.dop_cat_id IN (3297,437,447,446) AND
g.brand_id IN (1600,2460) AND
go.is_present AND go.is_active AND g.is_present_all_mods AND g.is_active
) A [0.0058438777923584 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_i303r3fnds1pinl1gud5354pcp_6a2ac1696d12f;
CREATE TEMPORARY TABLE tmp_counts_i303r3fnds1pinl1gud5354pcp_6a2ac1696d12f (
sub_icon_id INT NOT NULL PRIMARY KEY,
count INT NOT NULL
) ENGINE=MEMORY; [0.00036883354187012 sec]
INSERT IGNORE INTO tmp_counts_i303r3fnds1pinl1gud5354pcp_6a2ac1696d12f (sub_icon_id, count)
SELECT
sub_icon_id,
COUNT(DISTINCT entry) AS count
FROM (
SELECT A.entry, A.sub_icon_id
FROM tmp_A_i303r3fnds1pinl1gud5354pcp_6a2ac1696d12f A
INNER JOIN pod_sub_icon si ON A.sub_icon_id = si.id AND si.is_active_filter = 1
) AA
GROUP BY sub_icon_id [0.0004119873046875 sec]
SELECT
c.sub_icon_id AS id,
c.count,
si.entry,
si.name AS name,
si.url
FROM tmp_counts_i303r3fnds1pinl1gud5354pcp_6a2ac1696d12f c
INNER JOIN pod_sub_icon si ON c.sub_icon_id = si.id AND si.is_active_filter = 1
ORDER BY si.ordr, si.name [0.00026202201843262 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_i303r3fnds1pinl1gud5354pcp_6a2ac1696d12f [0.00025105476379395 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_i303r3fnds1pinl1gud5354pcp_6a2ac1696d12f [0.00012612342834473 sec]
Низкие цены на Детские конструкторы Same Toy ... Xtrem Bots (Сaмe Toи ... КСтрeм Бoц) – большой выбор, фото. Купить Детские конструкторы Same Toy ... Xtrem Bots (Сaмe Toи ... КСтрeм Бoц) в Киеве и Украине
Ваш заказ оформлен! На e-mail отправлено письмо с подтверждением В ближайшее время с Вами свяжется менеджер Спасибо за заказ!
Ваш профиль будет удален навсегда. Его нельзя восстановить. Продолжить?
Оставьте свой номер телефона и наши менеджеры вам перезвонят
Оплату картами Visa и MasterCard обеспечивает сервис онлайн-платежей Portmone.com. Безопасность оплаты подтверждена международным аудитом PCI DSS. Служба поддержки: тел. +380(44)2000902