Конструктор для хлопчиків : 6 років, 8 років, електронні, розвиваючі, набори, трансформери
Виробник: Super Wings (КНР)
Виробник: Super Wings (КНР)
Виробник: Super Wings (КНР)
SELECT url_to, r404
FROM pod_redirect
WHERE BINARY REPLACE(url_from,'/ru/','/') = '/konstruktory_dlya_malchikov/o_6-o_8-electronic-developing-constructor_sets-transformery.html' LIMIT 0,1 [0.00057387351989746 sec]
SELECT pod_filter.id,pod_filter.url FROM pod_filter WHERE BINARY pod_filter.url IN ('o_6','o_8','electronic','developing','constructor_sets','transformery') order by url [0.0017011165618896 sec]
SELECT pod_sub_icon.id,pod_sub_icon.url FROM pod_sub_icon WHERE BINARY pod_sub_icon.url IN ('o_6','o_8','electronic','developing','constructor_sets','transformery') order by url [0.0012729167938232 sec]
SELECT id, url FROM pod_filter WHERE url IN ('o_6','o_8','electronic','developing','constructor_sets','transformery') [0.0012049674987793 sec]
SELECT id, url FROM pod_sub_icon WHERE url IN ('o_6','o_8','electronic','developing','constructor_sets','transformery') [0.00085806846618652 sec]
SELECT f.id, mf.id as mf_id, mf.is_split
FROM pod_filter f
INNER JOIN pod_filter mf ON f.entry = mf.id
WHERE f.id in (466,463,462,364,366,3460) and f.is_active AND mf.is_active
ORDER BY mf.id, f.id [0.00048089027404785 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 (364,366)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (462,463,466)
INNER JOIN pod_good_filter gf2 ON g.id = gf2.id_good AND gf2.filter_id_value in (3460)
WHERE g.cat_id IN (446) 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 (364,366)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (462,463,466)
INNER JOIN pod_good_filter gf2 ON g.id = gf2.id_good AND gf2.filter_id_value in (3460)
WHERE dc.dop_cat_id IN (446) 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 (364,366)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (462,463,466)
INNER JOIN pod_good_filter gf2 ON g.id = gf2.id_good AND gf2.filter_id_value in (3460)
WHERE g.cat_id IN (446) 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 (364,366)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (462,463,466)
INNER JOIN pod_good_filter gf2 ON g.id = gf2.id_good AND gf2.filter_id_value in (3460)
WHERE dc.dop_cat_id IN (446) AND
go.is_present AND go.is_active AND g.is_present_all_mods AND g.is_active
[0.0088860988616943 sec]
CREATE TEMPORARY TABLE temp_brand_counts_6a2aa1f5083a5 (
id INT,
gid INT,
INDEX idx_id (id),
INDEX idx_gid (gid)
) [0.00037789344787598 sec]
INSERT INTO temp_brand_counts_6a2aa1f5083a5 (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 (364,366)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (462,463,466)
INNER JOIN pod_good_filter gf2 ON g.id = gf2.id_good AND gf2.filter_id_value in (3460)
WHERE g.cat_id IN (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 (364,366)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (462,463,466)
INNER JOIN pod_good_filter gf2 ON g.id = gf2.id_good AND gf2.filter_id_value in (3460)
WHERE dc.dop_cat_id IN (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 (364,366)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (462,463,466)
INNER JOIN pod_good_filter gf2 ON g.id = gf2.id_good AND gf2.filter_id_value in (3460)
WHERE g.cat_id IN (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 (364,366)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (462,463,466)
INNER JOIN pod_good_filter gf2 ON g.id = gf2.id_good AND gf2.filter_id_value in (3460)
WHERE dc.dop_cat_id IN (446) AND
go.is_present AND go.is_active AND g.is_present_all_mods AND g.is_active
[0.0027852058410645 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_6a2aa1f5083a5
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.00082302093505859 sec]
DROP TEMPORARY TABLE IF EXISTS temp_brand_counts_6a2aa1f5083a5 [0.0002288818359375 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 (364,366)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (462,463,466)
INNER JOIN pod_good_filter gf2 ON g.id = gf2.id_good AND gf2.filter_id_value in (3460)
WHERE g.cat_id IN (446) 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 (364,366)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (462,463,466)
INNER JOIN pod_good_filter gf2 ON g.id = gf2.id_good AND gf2.filter_id_value in (3460)
WHERE dc.dop_cat_id IN (446) 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 (364,366)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (462,463,466)
INNER JOIN pod_good_filter gf2 ON g.id = gf2.id_good AND gf2.filter_id_value in (3460)
WHERE g.cat_id IN (446) 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 (364,366)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (462,463,466)
INNER JOIN pod_good_filter gf2 ON g.id = gf2.id_good AND gf2.filter_id_value in (3460)
WHERE dc.dop_cat_id IN (446) AND
go.is_present AND go.is_active AND g.is_present_all_mods AND g.is_active
) A
[0.0024819374084473 sec]
SELECT id, name_ua AS name, url FROM pod_filter WHERE id in (466,463,462,364,366,3460) AND is_active='1' [0.00037407875061035 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_ku3ec2urparenoflcfutpkk7b5_6a2aa1f50cc83;
CREATE TEMPORARY TABLE tmp_A_ku3ec2urparenoflcfutpkk7b5_6a2aa1f50cc83 (
id INT NOT NULL,
PRIMARY KEY (id)
) ENGINE=MEMORY; [0.00048089027404785 sec]
INSERT INTO tmp_A_ku3ec2urparenoflcfutpkk7b5_6a2aa1f50cc83 (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 (364,366)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (462,463,466)
INNER JOIN pod_good_filter gf2 ON g.id = gf2.id_good AND gf2.filter_id_value in (3460)
WHERE g.cat_id IN (446) 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 (364,366)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (462,463,466)
INNER JOIN pod_good_filter gf2 ON g.id = gf2.id_good AND gf2.filter_id_value in (3460)
WHERE dc.dop_cat_id IN (446) 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 (364,366)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (462,463,466)
INNER JOIN pod_good_filter gf2 ON g.id = gf2.id_good AND gf2.filter_id_value in (3460)
WHERE g.cat_id IN (446) 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 (364,366)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (462,463,466)
INNER JOIN pod_good_filter gf2 ON g.id = gf2.id_good AND gf2.filter_id_value in (3460)
WHERE dc.dop_cat_id IN (446) AND
go.is_present AND go.is_active AND g.is_present_all_mods AND g.is_active
) A [0.0025360584259033 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_pairs_ku3ec2urparenoflcfutpkk7b5_6a2aa1f50cc83;
CREATE TEMPORARY TABLE tmp_pairs_ku3ec2urparenoflcfutpkk7b5_6a2aa1f50cc83 (
goods_id INT NOT NULL,
filter_id INT NOT NULL,
PRIMARY KEY (goods_id, filter_id)
) ENGINE=MEMORY; [0.00040102005004883 sec]
INSERT INTO tmp_pairs_ku3ec2urparenoflcfutpkk7b5_6a2aa1f50cc83 (goods_id, filter_id)
SELECT DISTINCT
A.id AS goods_id,
f.id AS filter_id
FROM tmp_A_ku3ec2urparenoflcfutpkk7b5_6a2aa1f50cc83 A
INNER JOIN pod_good_filter gf ON A.id = gf.id_good AND gf.filter_id_value NOT IN (364,366,462,463,466,3460)
INNER JOIN pod_cat_filter cf ON gf.filter_id = cf.filter_id AND cf.category_id = 446
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.0095620155334473 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_ku3ec2urparenoflcfutpkk7b5_6a2aa1f50cc83;
CREATE TEMPORARY TABLE tmp_counts_ku3ec2urparenoflcfutpkk7b5_6a2aa1f50cc83 (
filter_id INT NOT NULL PRIMARY KEY,
count INT NOT NULL
) ENGINE=MEMORY; [0.00046300888061523 sec]
INSERT IGNORE INTO tmp_counts_ku3ec2urparenoflcfutpkk7b5_6a2aa1f50cc83 (filter_id, count)
SELECT
p.filter_id,
COUNT(*) AS count
FROM tmp_pairs_ku3ec2urparenoflcfutpkk7b5_6a2aa1f50cc83 p
GROUP BY p.filter_id [0.0004279613494873 sec]
SELECT
c.filter_id,
c.count,
f.entry,
f.name_ua AS name,
f.url,
f.ord,
fm.name_ua AS mname,
fm.url AS murl,
fm.ord AS mord
FROM tmp_counts_ku3ec2urparenoflcfutpkk7b5_6a2aa1f50cc83 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.0003821849822998 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_ku3ec2urparenoflcfutpkk7b5_6a2aa1f50cc83 [0.0003359317779541 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_pairs_ku3ec2urparenoflcfutpkk7b5_6a2aa1f50cc83 [0.00015401840209961 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_ku3ec2urparenoflcfutpkk7b5_6a2aa1f50cc83 [0.00015997886657715 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_ku3ec2urparenoflcfutpkk7b5_6a2aa1f510cc0;
CREATE TEMPORARY TABLE tmp_A_ku3ec2urparenoflcfutpkk7b5_6a2aa1f510cc0 (
id INT NOT NULL,
entry INT NOT NULL,
PRIMARY KEY (id),
KEY idx_entry (entry)
) ENGINE=MEMORY; [0.00027108192443848 sec]
INSERT INTO tmp_A_ku3ec2urparenoflcfutpkk7b5_6a2aa1f510cc0 (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 (364,366)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (462,463,466)
INNER JOIN pod_good_filter gf2 ON g.id = gf2.id_good AND gf2.filter_id_value in (3460)
WHERE g.cat_id IN (446) 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 (364,366)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (462,463,466)
INNER JOIN pod_good_filter gf2 ON g.id = gf2.id_good AND gf2.filter_id_value in (3460)
WHERE dc.dop_cat_id IN (446) 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 (364,366)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (462,463,466)
INNER JOIN pod_good_filter gf2 ON g.id = gf2.id_good AND gf2.filter_id_value in (3460)
WHERE g.cat_id IN (446) 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 (364,366)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (462,463,466)
INNER JOIN pod_good_filter gf2 ON g.id = gf2.id_good AND gf2.filter_id_value in (3460)
WHERE dc.dop_cat_id IN (446) AND
go.is_present AND go.is_active AND g.is_present_all_mods AND g.is_active
) A [0.0026290416717529 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_pairs_ku3ec2urparenoflcfutpkk7b5_6a2aa1f510cc0;
CREATE TEMPORARY TABLE tmp_pairs_ku3ec2urparenoflcfutpkk7b5_6a2aa1f510cc0 (
goods_id INT NOT NULL,
filter_id INT NOT NULL,
PRIMARY KEY (goods_id, filter_id)
) ENGINE=MEMORY; [0.00037503242492676 sec]
INSERT INTO tmp_pairs_ku3ec2urparenoflcfutpkk7b5_6a2aa1f510cc0 (goods_id, filter_id)
SELECT DISTINCT
A.entry AS goods_id,
f.id AS filter_id
FROM tmp_A_ku3ec2urparenoflcfutpkk7b5_6a2aa1f510cc0 A
INNER JOIN pod_good_filter gf ON A.id = gf.id_good AND gf.filter_id_value NOT IN (364,366,462,463,466,3460)
INNER JOIN pod_cat_filter cf ON gf.filter_id = cf.filter_id AND cf.category_id = 446
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.0010890960693359 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_ku3ec2urparenoflcfutpkk7b5_6a2aa1f510cc0;
CREATE TEMPORARY TABLE tmp_counts_ku3ec2urparenoflcfutpkk7b5_6a2aa1f510cc0 (
filter_id INT NOT NULL PRIMARY KEY,
count INT NOT NULL
) ENGINE=MEMORY; [0.00036501884460449 sec]
INSERT IGNORE INTO tmp_counts_ku3ec2urparenoflcfutpkk7b5_6a2aa1f510cc0 (filter_id, count)
SELECT
p.filter_id,
COUNT(*) AS count
FROM tmp_pairs_ku3ec2urparenoflcfutpkk7b5_6a2aa1f510cc0 p
GROUP BY p.filter_id [0.0003349781036377 sec]
SELECT
c.filter_id,
c.count,
f.entry,
f.name_ua AS name,
f.url,
f.ord,
fm.name_ua AS mname,
fm.url AS murl,
fm.ord AS mord
FROM tmp_counts_ku3ec2urparenoflcfutpkk7b5_6a2aa1f510cc0 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.00038981437683105 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_ku3ec2urparenoflcfutpkk7b5_6a2aa1f510cc0 [0.00024700164794922 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_pairs_ku3ec2urparenoflcfutpkk7b5_6a2aa1f510cc0 [0.00011610984802246 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_ku3ec2urparenoflcfutpkk7b5_6a2aa1f510cc0 [0.00010991096496582 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_ku3ec2urparenoflcfutpkk7b5_6a2aa1f512bd7;
CREATE TEMPORARY TABLE tmp_A_ku3ec2urparenoflcfutpkk7b5_6a2aa1f512bd7 (
id INT NOT NULL,
entry INT NOT NULL,
PRIMARY KEY (id),
KEY idx_entry (entry)
) ENGINE=MEMORY [0.0002741813659668 sec]
INSERT INTO tmp_A_ku3ec2urparenoflcfutpkk7b5_6a2aa1f512bd7 (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 (462,463,466)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (3460)
WHERE g.cat_id IN (446) 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 (462,463,466)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (3460)
WHERE dc.dop_cat_id IN (446) 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 (462,463,466)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (3460)
WHERE g.cat_id IN (446) 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 (462,463,466)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (3460)
WHERE dc.dop_cat_id IN (446) AND
go.is_present AND go.is_active AND g.is_present_all_mods AND g.is_active
) A [0.0020179748535156 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_pairs_ku3ec2urparenoflcfutpkk7b5_6a2aa1f512bd7;
CREATE TEMPORARY TABLE tmp_pairs_ku3ec2urparenoflcfutpkk7b5_6a2aa1f512bd7 (
goods_id INT NOT NULL,
filter_id INT NOT NULL,
PRIMARY KEY (goods_id, filter_id)
) ENGINE=MEMORY [0.00034189224243164 sec]
INSERT INTO tmp_pairs_ku3ec2urparenoflcfutpkk7b5_6a2aa1f512bd7 (goods_id, filter_id)
SELECT DISTINCT
A.entry AS goods_id,
f.id AS filter_id
FROM tmp_A_ku3ec2urparenoflcfutpkk7b5_6a2aa1f512bd7 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.00071811676025391 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_ku3ec2urparenoflcfutpkk7b5_6a2aa1f512bd7;
CREATE TEMPORARY TABLE tmp_counts_ku3ec2urparenoflcfutpkk7b5_6a2aa1f512bd7 (
filter_id INT NOT NULL PRIMARY KEY,
count INT NOT NULL
) ENGINE=MEMORY [0.0003361701965332 sec]
INSERT INTO tmp_counts_ku3ec2urparenoflcfutpkk7b5_6a2aa1f512bd7 (filter_id, count)
SELECT
p.filter_id,
COUNT(*) AS count
FROM tmp_pairs_ku3ec2urparenoflcfutpkk7b5_6a2aa1f512bd7 p
GROUP BY p.filter_id [0.0003349781036377 sec]
INSERT INTO tmp_counts_ku3ec2urparenoflcfutpkk7b5_6a2aa1f512bd7 (filter_id, count)
SELECT pf.id, 0
FROM pod_filter pf
LEFT JOIN tmp_counts_ku3ec2urparenoflcfutpkk7b5_6a2aa1f512bd7 c ON c.filter_id = pf.id
WHERE pf.id in (364,366) AND c.filter_id IS NULL [0.0003199577331543 sec]
SELECT
c.filter_id,
c.count,
f.entry,
f.name_ua AS name,
f.url,
f.ord,
fm.name_ua AS mname,
fm.url AS murl,
fm.ord AS mord
FROM tmp_counts_ku3ec2urparenoflcfutpkk7b5_6a2aa1f512bd7 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.00041890144348145 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_ku3ec2urparenoflcfutpkk7b5_6a2aa1f512bd7 [0.00024604797363281 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_pairs_ku3ec2urparenoflcfutpkk7b5_6a2aa1f512bd7 [0.00013089179992676 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_ku3ec2urparenoflcfutpkk7b5_6a2aa1f512bd7 [0.00018191337585449 sec]
SELECT f.id, mf.id as mf_id, mf.is_split
FROM pod_filter f
INNER JOIN pod_filter mf ON f.entry = mf.id
WHERE f.id in (364,366,3460) and f.is_active AND mf.is_active
ORDER BY mf.id, f.id [0.00036191940307617 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_ku3ec2urparenoflcfutpkk7b5_6a2aa1f514a85;
CREATE TEMPORARY TABLE tmp_A_ku3ec2urparenoflcfutpkk7b5_6a2aa1f514a85 (
id INT NOT NULL,
PRIMARY KEY (id)
) ENGINE=MEMORY; [0.00027203559875488 sec]
INSERT INTO tmp_A_ku3ec2urparenoflcfutpkk7b5_6a2aa1f514a85 (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 (364,366)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (3460)
WHERE g.cat_id IN (446) 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 (364,366)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (3460)
WHERE dc.dop_cat_id IN (446) 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 (364,366)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (3460)
WHERE g.cat_id IN (446) 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 (364,366)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (3460)
WHERE dc.dop_cat_id IN (446) AND
go.is_present AND go.is_active AND g.is_present_all_mods AND g.is_active
) A [0.0013439655303955 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_pairs_ku3ec2urparenoflcfutpkk7b5_6a2aa1f514a85;
CREATE TEMPORARY TABLE tmp_pairs_ku3ec2urparenoflcfutpkk7b5_6a2aa1f514a85 (
goods_id INT NOT NULL,
filter_id INT NOT NULL,
PRIMARY KEY (goods_id, filter_id)
) ENGINE=MEMORY; [0.00027084350585938 sec]
INSERT INTO tmp_pairs_ku3ec2urparenoflcfutpkk7b5_6a2aa1f514a85 (goods_id, filter_id)
SELECT DISTINCT
A.id AS goods_id,
f.id AS filter_id
FROM tmp_A_ku3ec2urparenoflcfutpkk7b5_6a2aa1f514a85 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.00041604042053223 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_ku3ec2urparenoflcfutpkk7b5_6a2aa1f514a85;
CREATE TEMPORARY TABLE tmp_counts_ku3ec2urparenoflcfutpkk7b5_6a2aa1f514a85 (
filter_id INT NOT NULL PRIMARY KEY,
count INT NOT NULL
) ENGINE=MEMORY; [0.00025200843811035 sec]
INSERT INTO tmp_counts_ku3ec2urparenoflcfutpkk7b5_6a2aa1f514a85 (filter_id, count)
SELECT
p.filter_id,
COUNT(*) AS count
FROM tmp_pairs_ku3ec2urparenoflcfutpkk7b5_6a2aa1f514a85 p
GROUP BY p.filter_id [0.00028800964355469 sec]
INSERT IGNORE INTO tmp_counts_ku3ec2urparenoflcfutpkk7b5_6a2aa1f514a85 (filter_id, count)
SELECT pf.id, 0
FROM pod_filter pf
LEFT JOIN tmp_counts_ku3ec2urparenoflcfutpkk7b5_6a2aa1f514a85 c ON c.filter_id = pf.id
WHERE pf.id in (462,463,466) AND c.filter_id IS NULL [0.00022006034851074 sec]
SELECT
c.filter_id,
c.count,
f.entry,
f.name_ua AS name,
f.url,
f.ord,
fm.name_ua AS mname,
fm.url AS murl,
fm.ord AS mord
FROM tmp_counts_ku3ec2urparenoflcfutpkk7b5_6a2aa1f514a85 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.00023293495178223 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_ku3ec2urparenoflcfutpkk7b5_6a2aa1f514a85 [0.00022387504577637 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_pairs_ku3ec2urparenoflcfutpkk7b5_6a2aa1f514a85 [9.0837478637695E-5 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_ku3ec2urparenoflcfutpkk7b5_6a2aa1f514a85 [0.0001070499420166 sec]
SELECT f.id, mf.id as mf_id, mf.is_split
FROM pod_filter f
INNER JOIN pod_filter mf ON f.entry = mf.id
WHERE f.id in (466,463,462,364,366) and f.is_active AND mf.is_active
ORDER BY mf.id, f.id [0.00032496452331543 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_ku3ec2urparenoflcfutpkk7b5_6a2aa1f51622f;
CREATE TEMPORARY TABLE tmp_A_ku3ec2urparenoflcfutpkk7b5_6a2aa1f51622f (
id INT NOT NULL,
PRIMARY KEY (id)
) ENGINE=MEMORY; [0.00028181076049805 sec]
INSERT INTO tmp_A_ku3ec2urparenoflcfutpkk7b5_6a2aa1f51622f (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 (364,366)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (462,463,466)
WHERE g.cat_id IN (446) 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 (364,366)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (462,463,466)
WHERE dc.dop_cat_id IN (446) 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 (364,366)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (462,463,466)
WHERE g.cat_id IN (446) 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 (364,366)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (462,463,466)
WHERE dc.dop_cat_id IN (446) AND
go.is_present AND go.is_active AND g.is_present_all_mods AND g.is_active
) A [0.0076048374176025 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_pairs_ku3ec2urparenoflcfutpkk7b5_6a2aa1f51622f;
CREATE TEMPORARY TABLE tmp_pairs_ku3ec2urparenoflcfutpkk7b5_6a2aa1f51622f (
goods_id INT NOT NULL,
filter_id INT NOT NULL,
PRIMARY KEY (goods_id, filter_id)
) ENGINE=MEMORY; [0.00034117698669434 sec]
INSERT INTO tmp_pairs_ku3ec2urparenoflcfutpkk7b5_6a2aa1f51622f (goods_id, filter_id)
SELECT DISTINCT
A.id AS goods_id,
f.id AS filter_id
FROM tmp_A_ku3ec2urparenoflcfutpkk7b5_6a2aa1f51622f A
INNER JOIN pod_good_filter gf ON A.id = gf.id_good AND gf.filter_id = 3436
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.0055611133575439 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_ku3ec2urparenoflcfutpkk7b5_6a2aa1f51622f;
CREATE TEMPORARY TABLE tmp_counts_ku3ec2urparenoflcfutpkk7b5_6a2aa1f51622f (
filter_id INT NOT NULL PRIMARY KEY,
count INT NOT NULL
) ENGINE=MEMORY; [0.00033283233642578 sec]
INSERT INTO tmp_counts_ku3ec2urparenoflcfutpkk7b5_6a2aa1f51622f (filter_id, count)
SELECT
p.filter_id,
COUNT(*) AS count
FROM tmp_pairs_ku3ec2urparenoflcfutpkk7b5_6a2aa1f51622f p
GROUP BY p.filter_id [0.00035691261291504 sec]
INSERT IGNORE INTO tmp_counts_ku3ec2urparenoflcfutpkk7b5_6a2aa1f51622f (filter_id, count)
SELECT pf.id, 0
FROM pod_filter pf
LEFT JOIN tmp_counts_ku3ec2urparenoflcfutpkk7b5_6a2aa1f51622f c ON c.filter_id = pf.id
WHERE pf.id in (3460) AND c.filter_id IS NULL [0.00026607513427734 sec]
SELECT
c.filter_id,
c.count,
f.entry,
f.name_ua AS name,
f.url,
f.ord,
fm.name_ua AS mname,
fm.url AS murl,
fm.ord AS mord
FROM tmp_counts_ku3ec2urparenoflcfutpkk7b5_6a2aa1f51622f 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.0003199577331543 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_ku3ec2urparenoflcfutpkk7b5_6a2aa1f51622f [0.00025200843811035 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_pairs_ku3ec2urparenoflcfutpkk7b5_6a2aa1f51622f [0.00010585784912109 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_ku3ec2urparenoflcfutpkk7b5_6a2aa1f51622f [9.7036361694336E-5 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_ku3ec2urparenoflcfutpkk7b5_6a2aa1f51a642;
CREATE TEMPORARY TABLE tmp_A_ku3ec2urparenoflcfutpkk7b5_6a2aa1f51a642 (
entry INT NOT NULL,
sub_icon_id INT NOT NULL,
PRIMARY KEY (entry, sub_icon_id)
) ENGINE=MEMORY; [0.00024986267089844 sec]
INSERT IGNORE INTO tmp_A_ku3ec2urparenoflcfutpkk7b5_6a2aa1f51a642 (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 (364,366)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (462,463,466)
INNER JOIN pod_good_filter gf2 ON g.id = gf2.id_good AND gf2.filter_id_value in (3460)
WHERE g.cat_id IN (446) 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 (364,366)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (462,463,466)
INNER JOIN pod_good_filter gf2 ON g.id = gf2.id_good AND gf2.filter_id_value in (3460)
WHERE dc.dop_cat_id IN (446) 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 (364,366)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (462,463,466)
INNER JOIN pod_good_filter gf2 ON g.id = gf2.id_good AND gf2.filter_id_value in (3460)
WHERE g.cat_id IN (446) 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 (364,366)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (462,463,466)
INNER JOIN pod_good_filter gf2 ON g.id = gf2.id_good AND gf2.filter_id_value in (3460)
WHERE dc.dop_cat_id IN (446) AND
go.is_present AND go.is_active AND g.is_present_all_mods AND g.is_active
) A [0.0019981861114502 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_ku3ec2urparenoflcfutpkk7b5_6a2aa1f51a642;
CREATE TEMPORARY TABLE tmp_counts_ku3ec2urparenoflcfutpkk7b5_6a2aa1f51a642 (
sub_icon_id INT NOT NULL PRIMARY KEY,
count INT NOT NULL
) ENGINE=MEMORY; [0.00026297569274902 sec]
INSERT IGNORE INTO tmp_counts_ku3ec2urparenoflcfutpkk7b5_6a2aa1f51a642 (sub_icon_id, count)
SELECT
sub_icon_id,
COUNT(DISTINCT entry) AS count
FROM (
SELECT A.entry, A.sub_icon_id
FROM tmp_A_ku3ec2urparenoflcfutpkk7b5_6a2aa1f51a642 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.00033998489379883 sec]
SELECT
c.sub_icon_id AS id,
c.count,
si.entry,
si.name_ua AS name,
si.url
FROM tmp_counts_ku3ec2urparenoflcfutpkk7b5_6a2aa1f51a642 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.00023508071899414 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_ku3ec2urparenoflcfutpkk7b5_6a2aa1f51a642 [0.00024700164794922 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_ku3ec2urparenoflcfutpkk7b5_6a2aa1f51a642 [0.00011706352233887 sec]
DEVELOPMENT🌷ЗНИЖКИ ДО 70%
ПЕРЕЙТИ
Виробник: Super Wings (КНР)
Виробник: Super Wings (КНР)
Виробник: Super Wings (КНР)