Конструктор для дівчаток : 5 років, 13 років, розвиваючі, набори, трансформери, тварини
Виробник: Super Wings (КНР)
Виробник: Super Wings (КНР)
Виробник: Super Wings (КНР)
Виробник: Picasso (США)
Виробник: Tigres (Украина)
SELECT url_to, r404
FROM pod_redirect
WHERE BINARY REPLACE(url_from,'/ru/','/') = '/konstruktor_dlya_devochek/o_5-o_13-developing-constructor_sets-transformery-animal.html' LIMIT 0,1 [0.00052690505981445 sec]
SELECT pod_filter.id,pod_filter.url FROM pod_filter WHERE BINARY pod_filter.url IN ('o_5','o_13','developing','constructor_sets','transformery','animal') order by url [0.0019090175628662 sec]
SELECT pod_sub_icon.id,pod_sub_icon.url FROM pod_sub_icon WHERE BINARY pod_sub_icon.url IN ('o_5','o_13','developing','constructor_sets','transformery','animal') order by url [0.001384973526001 sec]
SELECT id, url FROM pod_filter WHERE url IN ('o_5','o_13','developing','constructor_sets','transformery','animal') [0.0010378360748291 sec]
SELECT id, url FROM pod_sub_icon WHERE url IN ('o_5','o_13','developing','constructor_sets','transformery','animal') [0.00088691711425781 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 (3463,466,463,379,363,3460) and f.is_active AND mf.is_active
ORDER BY mf.id, f.id [0.00043988227844238 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 (363,379)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (463,466)
INNER JOIN pod_good_filter gf2 ON g.id = gf2.id_good AND gf2.filter_id_value in (3460,3463)
WHERE g.cat_id IN (447) 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 (363,379)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (463,466)
INNER JOIN pod_good_filter gf2 ON g.id = gf2.id_good AND gf2.filter_id_value in (3460,3463)
WHERE dc.dop_cat_id IN (447) 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 (363,379)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (463,466)
INNER JOIN pod_good_filter gf2 ON g.id = gf2.id_good AND gf2.filter_id_value in (3460,3463)
WHERE g.cat_id IN (447) 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 (363,379)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (463,466)
INNER JOIN pod_good_filter gf2 ON g.id = gf2.id_good AND gf2.filter_id_value in (3460,3463)
WHERE dc.dop_cat_id IN (447) AND
go.is_present AND go.is_active AND g.is_present_all_mods AND g.is_active
[0.037127017974854 sec]
CREATE TEMPORARY TABLE temp_brand_counts_6a2ab95ccc6b9 (
id INT,
gid INT,
INDEX idx_id (id),
INDEX idx_gid (gid)
) [0.00039505958557129 sec]
INSERT INTO temp_brand_counts_6a2ab95ccc6b9 (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 (363,379)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (463,466)
INNER JOIN pod_good_filter gf2 ON g.id = gf2.id_good AND gf2.filter_id_value in (3460,3463)
WHERE g.cat_id IN (447) 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 (363,379)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (463,466)
INNER JOIN pod_good_filter gf2 ON g.id = gf2.id_good AND gf2.filter_id_value in (3460,3463)
WHERE dc.dop_cat_id IN (447) 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 (363,379)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (463,466)
INNER JOIN pod_good_filter gf2 ON g.id = gf2.id_good AND gf2.filter_id_value in (3460,3463)
WHERE g.cat_id IN (447) 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 (363,379)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (463,466)
INNER JOIN pod_good_filter gf2 ON g.id = gf2.id_good AND gf2.filter_id_value in (3460,3463)
WHERE dc.dop_cat_id IN (447) AND
go.is_present AND go.is_active AND g.is_present_all_mods AND g.is_active
[0.0035510063171387 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_6a2ab95ccc6b9
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.00079202651977539 sec]
DROP TEMPORARY TABLE IF EXISTS temp_brand_counts_6a2ab95ccc6b9 [0.00025701522827148 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 (363,379)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (463,466)
INNER JOIN pod_good_filter gf2 ON g.id = gf2.id_good AND gf2.filter_id_value in (3460,3463)
WHERE g.cat_id IN (447) 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 (363,379)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (463,466)
INNER JOIN pod_good_filter gf2 ON g.id = gf2.id_good AND gf2.filter_id_value in (3460,3463)
WHERE dc.dop_cat_id IN (447) 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 (363,379)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (463,466)
INNER JOIN pod_good_filter gf2 ON g.id = gf2.id_good AND gf2.filter_id_value in (3460,3463)
WHERE g.cat_id IN (447) 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 (363,379)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (463,466)
INNER JOIN pod_good_filter gf2 ON g.id = gf2.id_good AND gf2.filter_id_value in (3460,3463)
WHERE dc.dop_cat_id IN (447) AND
go.is_present AND go.is_active AND g.is_present_all_mods AND g.is_active
) A
[0.0039300918579102 sec]
SELECT id, name_ua AS name, url FROM pod_filter WHERE id in (3463,466,463,379,363,3460) AND is_active='1' [0.00040388107299805 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_941ncji9ed69qulgtu8pvtsh8u_6a2ab95cd260e;
CREATE TEMPORARY TABLE tmp_A_941ncji9ed69qulgtu8pvtsh8u_6a2ab95cd260e (
id INT NOT NULL,
PRIMARY KEY (id)
) ENGINE=MEMORY; [0.00047397613525391 sec]
INSERT INTO tmp_A_941ncji9ed69qulgtu8pvtsh8u_6a2ab95cd260e (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 (363,379)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (463,466)
INNER JOIN pod_good_filter gf2 ON g.id = gf2.id_good AND gf2.filter_id_value in (3460,3463)
WHERE g.cat_id IN (447) 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 (363,379)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (463,466)
INNER JOIN pod_good_filter gf2 ON g.id = gf2.id_good AND gf2.filter_id_value in (3460,3463)
WHERE dc.dop_cat_id IN (447) 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 (363,379)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (463,466)
INNER JOIN pod_good_filter gf2 ON g.id = gf2.id_good AND gf2.filter_id_value in (3460,3463)
WHERE g.cat_id IN (447) 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 (363,379)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (463,466)
INNER JOIN pod_good_filter gf2 ON g.id = gf2.id_good AND gf2.filter_id_value in (3460,3463)
WHERE dc.dop_cat_id IN (447) AND
go.is_present AND go.is_active AND g.is_present_all_mods AND g.is_active
) A [0.003756046295166 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_pairs_941ncji9ed69qulgtu8pvtsh8u_6a2ab95cd260e;
CREATE TEMPORARY TABLE tmp_pairs_941ncji9ed69qulgtu8pvtsh8u_6a2ab95cd260e (
goods_id INT NOT NULL,
filter_id INT NOT NULL,
PRIMARY KEY (goods_id, filter_id)
) ENGINE=MEMORY; [0.00042295455932617 sec]
INSERT INTO tmp_pairs_941ncji9ed69qulgtu8pvtsh8u_6a2ab95cd260e (goods_id, filter_id)
SELECT DISTINCT
A.id AS goods_id,
f.id AS filter_id
FROM tmp_A_941ncji9ed69qulgtu8pvtsh8u_6a2ab95cd260e A
INNER JOIN pod_good_filter gf ON A.id = gf.id_good AND gf.filter_id_value NOT IN (363,379,463,466,3460,3463)
INNER JOIN pod_cat_filter cf ON gf.filter_id = cf.filter_id AND cf.category_id = 447
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.016215085983276 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_941ncji9ed69qulgtu8pvtsh8u_6a2ab95cd260e;
CREATE TEMPORARY TABLE tmp_counts_941ncji9ed69qulgtu8pvtsh8u_6a2ab95cd260e (
filter_id INT NOT NULL PRIMARY KEY,
count INT NOT NULL
) ENGINE=MEMORY; [0.00041413307189941 sec]
INSERT IGNORE INTO tmp_counts_941ncji9ed69qulgtu8pvtsh8u_6a2ab95cd260e (filter_id, count)
SELECT
p.filter_id,
COUNT(*) AS count
FROM tmp_pairs_941ncji9ed69qulgtu8pvtsh8u_6a2ab95cd260e p
GROUP BY p.filter_id [0.00058984756469727 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_941ncji9ed69qulgtu8pvtsh8u_6a2ab95cd260e 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.00044608116149902 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_941ncji9ed69qulgtu8pvtsh8u_6a2ab95cd260e [0.00038814544677734 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_pairs_941ncji9ed69qulgtu8pvtsh8u_6a2ab95cd260e [0.00014209747314453 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_941ncji9ed69qulgtu8pvtsh8u_6a2ab95cd260e [0.00012993812561035 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_941ncji9ed69qulgtu8pvtsh8u_6a2ab95cd85d4;
CREATE TEMPORARY TABLE tmp_A_941ncji9ed69qulgtu8pvtsh8u_6a2ab95cd85d4 (
id INT NOT NULL,
entry INT NOT NULL,
PRIMARY KEY (id),
KEY idx_entry (entry)
) ENGINE=MEMORY; [0.00041508674621582 sec]
INSERT INTO tmp_A_941ncji9ed69qulgtu8pvtsh8u_6a2ab95cd85d4 (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 (363,379)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (463,466)
INNER JOIN pod_good_filter gf2 ON g.id = gf2.id_good AND gf2.filter_id_value in (3460,3463)
WHERE g.cat_id IN (447) 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 (363,379)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (463,466)
INNER JOIN pod_good_filter gf2 ON g.id = gf2.id_good AND gf2.filter_id_value in (3460,3463)
WHERE dc.dop_cat_id IN (447) 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 (363,379)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (463,466)
INNER JOIN pod_good_filter gf2 ON g.id = gf2.id_good AND gf2.filter_id_value in (3460,3463)
WHERE g.cat_id IN (447) 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 (363,379)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (463,466)
INNER JOIN pod_good_filter gf2 ON g.id = gf2.id_good AND gf2.filter_id_value in (3460,3463)
WHERE dc.dop_cat_id IN (447) AND
go.is_present AND go.is_active AND g.is_present_all_mods AND g.is_active
) A [0.0033440589904785 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_pairs_941ncji9ed69qulgtu8pvtsh8u_6a2ab95cd85d4;
CREATE TEMPORARY TABLE tmp_pairs_941ncji9ed69qulgtu8pvtsh8u_6a2ab95cd85d4 (
goods_id INT NOT NULL,
filter_id INT NOT NULL,
PRIMARY KEY (goods_id, filter_id)
) ENGINE=MEMORY; [0.00051712989807129 sec]
INSERT INTO tmp_pairs_941ncji9ed69qulgtu8pvtsh8u_6a2ab95cd85d4 (goods_id, filter_id)
SELECT DISTINCT
A.entry AS goods_id,
f.id AS filter_id
FROM tmp_A_941ncji9ed69qulgtu8pvtsh8u_6a2ab95cd85d4 A
INNER JOIN pod_good_filter gf ON A.id = gf.id_good AND gf.filter_id_value NOT IN (363,379,463,466,3460,3463)
INNER JOIN pod_cat_filter cf ON gf.filter_id = cf.filter_id AND cf.category_id = 447
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.0012969970703125 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_941ncji9ed69qulgtu8pvtsh8u_6a2ab95cd85d4;
CREATE TEMPORARY TABLE tmp_counts_941ncji9ed69qulgtu8pvtsh8u_6a2ab95cd85d4 (
filter_id INT NOT NULL PRIMARY KEY,
count INT NOT NULL
) ENGINE=MEMORY; [0.00043702125549316 sec]
INSERT IGNORE INTO tmp_counts_941ncji9ed69qulgtu8pvtsh8u_6a2ab95cd85d4 (filter_id, count)
SELECT
p.filter_id,
COUNT(*) AS count
FROM tmp_pairs_941ncji9ed69qulgtu8pvtsh8u_6a2ab95cd85d4 p
GROUP BY p.filter_id [0.00046491622924805 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_941ncji9ed69qulgtu8pvtsh8u_6a2ab95cd85d4 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.00039291381835938 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_941ncji9ed69qulgtu8pvtsh8u_6a2ab95cd85d4 [0.00036811828613281 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_pairs_941ncji9ed69qulgtu8pvtsh8u_6a2ab95cd85d4 [0.00013995170593262 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_941ncji9ed69qulgtu8pvtsh8u_6a2ab95cd85d4 [0.00012683868408203 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 (3463,466,463,3460) and f.is_active AND mf.is_active
ORDER BY mf.id, f.id [0.00065994262695312 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 (3463,379,363,3460) and f.is_active AND mf.is_active
ORDER BY mf.id, f.id [0.00056195259094238 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_941ncji9ed69qulgtu8pvtsh8u_6a2ab95cdbab3;
CREATE TEMPORARY TABLE tmp_A_941ncji9ed69qulgtu8pvtsh8u_6a2ab95cdbab3 (
id INT NOT NULL,
PRIMARY KEY (id)
) ENGINE=MEMORY; [0.0006260871887207 sec]
INSERT INTO tmp_A_941ncji9ed69qulgtu8pvtsh8u_6a2ab95cdbab3 (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 (363,379)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (3460,3463)
WHERE g.cat_id IN (447) 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 (363,379)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (3460,3463)
WHERE dc.dop_cat_id IN (447) 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 (363,379)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (3460,3463)
WHERE g.cat_id IN (447) 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 (363,379)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (3460,3463)
WHERE dc.dop_cat_id IN (447) AND
go.is_present AND go.is_active AND g.is_present_all_mods AND g.is_active
) A [0.0041611194610596 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_pairs_941ncji9ed69qulgtu8pvtsh8u_6a2ab95cdbab3;
CREATE TEMPORARY TABLE tmp_pairs_941ncji9ed69qulgtu8pvtsh8u_6a2ab95cdbab3 (
goods_id INT NOT NULL,
filter_id INT NOT NULL,
PRIMARY KEY (goods_id, filter_id)
) ENGINE=MEMORY; [0.00052309036254883 sec]
INSERT INTO tmp_pairs_941ncji9ed69qulgtu8pvtsh8u_6a2ab95cdbab3 (goods_id, filter_id)
SELECT DISTINCT
A.id AS goods_id,
f.id AS filter_id
FROM tmp_A_941ncji9ed69qulgtu8pvtsh8u_6a2ab95cdbab3 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.0036571025848389 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_941ncji9ed69qulgtu8pvtsh8u_6a2ab95cdbab3;
CREATE TEMPORARY TABLE tmp_counts_941ncji9ed69qulgtu8pvtsh8u_6a2ab95cdbab3 (
filter_id INT NOT NULL PRIMARY KEY,
count INT NOT NULL
) ENGINE=MEMORY; [0.00031709671020508 sec]
INSERT INTO tmp_counts_941ncji9ed69qulgtu8pvtsh8u_6a2ab95cdbab3 (filter_id, count)
SELECT
p.filter_id,
COUNT(*) AS count
FROM tmp_pairs_941ncji9ed69qulgtu8pvtsh8u_6a2ab95cdbab3 p
GROUP BY p.filter_id [0.00029397010803223 sec]
INSERT IGNORE INTO tmp_counts_941ncji9ed69qulgtu8pvtsh8u_6a2ab95cdbab3 (filter_id, count)
SELECT pf.id, 0
FROM pod_filter pf
LEFT JOIN tmp_counts_941ncji9ed69qulgtu8pvtsh8u_6a2ab95cdbab3 c ON c.filter_id = pf.id
WHERE pf.id in (463,466) AND c.filter_id IS NULL [0.00035500526428223 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_941ncji9ed69qulgtu8pvtsh8u_6a2ab95cdbab3 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.00034904479980469 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_941ncji9ed69qulgtu8pvtsh8u_6a2ab95cdbab3 [0.00026702880859375 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_pairs_941ncji9ed69qulgtu8pvtsh8u_6a2ab95cdbab3 [9.7036361694336E-5 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_941ncji9ed69qulgtu8pvtsh8u_6a2ab95cdbab3 [0.00010514259338379 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_941ncji9ed69qulgtu8pvtsh8u_6a2ab95cdea5a;
CREATE TEMPORARY TABLE tmp_A_941ncji9ed69qulgtu8pvtsh8u_6a2ab95cdea5a (
id INT NOT NULL,
PRIMARY KEY (id)
) ENGINE=MEMORY; [0.00028800964355469 sec]
INSERT INTO tmp_A_941ncji9ed69qulgtu8pvtsh8u_6a2ab95cdea5a (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 (363,379)
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 (447) 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 (363,379)
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 (447) 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 (363,379)
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 (447) 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 (363,379)
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 (447) AND
go.is_present AND go.is_active AND g.is_present_all_mods AND g.is_active
) A [0.042015075683594 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_pairs_941ncji9ed69qulgtu8pvtsh8u_6a2ab95cdea5a;
CREATE TEMPORARY TABLE tmp_pairs_941ncji9ed69qulgtu8pvtsh8u_6a2ab95cdea5a (
goods_id INT NOT NULL,
filter_id INT NOT NULL,
PRIMARY KEY (goods_id, filter_id)
) ENGINE=MEMORY; [0.00028800964355469 sec]
INSERT INTO tmp_pairs_941ncji9ed69qulgtu8pvtsh8u_6a2ab95cdea5a (goods_id, filter_id)
SELECT DISTINCT
A.id AS goods_id,
f.id AS filter_id
FROM tmp_A_941ncji9ed69qulgtu8pvtsh8u_6a2ab95cdea5a 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.0021891593933105 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_941ncji9ed69qulgtu8pvtsh8u_6a2ab95cdea5a;
CREATE TEMPORARY TABLE tmp_counts_941ncji9ed69qulgtu8pvtsh8u_6a2ab95cdea5a (
filter_id INT NOT NULL PRIMARY KEY,
count INT NOT NULL
) ENGINE=MEMORY; [0.00019502639770508 sec]
INSERT INTO tmp_counts_941ncji9ed69qulgtu8pvtsh8u_6a2ab95cdea5a (filter_id, count)
SELECT
p.filter_id,
COUNT(*) AS count
FROM tmp_pairs_941ncji9ed69qulgtu8pvtsh8u_6a2ab95cdea5a p
GROUP BY p.filter_id [0.0002140998840332 sec]
INSERT IGNORE INTO tmp_counts_941ncji9ed69qulgtu8pvtsh8u_6a2ab95cdea5a (filter_id, count)
SELECT pf.id, 0
FROM pod_filter pf
LEFT JOIN tmp_counts_941ncji9ed69qulgtu8pvtsh8u_6a2ab95cdea5a c ON c.filter_id = pf.id
WHERE pf.id in (3460,3463) AND c.filter_id IS NULL [0.00018405914306641 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_941ncji9ed69qulgtu8pvtsh8u_6a2ab95cdea5a 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.00020599365234375 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_941ncji9ed69qulgtu8pvtsh8u_6a2ab95cdea5a [0.00014996528625488 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_pairs_941ncji9ed69qulgtu8pvtsh8u_6a2ab95cdea5a [5.9843063354492E-5 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_941ncji9ed69qulgtu8pvtsh8u_6a2ab95cdea5a [5.6028366088867E-5 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_941ncji9ed69qulgtu8pvtsh8u_6a2ab95cea249;
CREATE TEMPORARY TABLE tmp_A_941ncji9ed69qulgtu8pvtsh8u_6a2ab95cea249 (
entry INT NOT NULL,
sub_icon_id INT NOT NULL,
PRIMARY KEY (entry, sub_icon_id)
) ENGINE=MEMORY; [0.00019001960754395 sec]
INSERT IGNORE INTO tmp_A_941ncji9ed69qulgtu8pvtsh8u_6a2ab95cea249 (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 (363,379)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (463,466)
INNER JOIN pod_good_filter gf2 ON g.id = gf2.id_good AND gf2.filter_id_value in (3460,3463)
WHERE g.cat_id IN (447) 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 (363,379)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (463,466)
INNER JOIN pod_good_filter gf2 ON g.id = gf2.id_good AND gf2.filter_id_value in (3460,3463)
WHERE dc.dop_cat_id IN (447) 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 (363,379)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (463,466)
INNER JOIN pod_good_filter gf2 ON g.id = gf2.id_good AND gf2.filter_id_value in (3460,3463)
WHERE g.cat_id IN (447) 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 (363,379)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (463,466)
INNER JOIN pod_good_filter gf2 ON g.id = gf2.id_good AND gf2.filter_id_value in (3460,3463)
WHERE dc.dop_cat_id IN (447) AND
go.is_present AND go.is_active AND g.is_present_all_mods AND g.is_active
) A [0.0075421333312988 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_941ncji9ed69qulgtu8pvtsh8u_6a2ab95cea249;
CREATE TEMPORARY TABLE tmp_counts_941ncji9ed69qulgtu8pvtsh8u_6a2ab95cea249 (
sub_icon_id INT NOT NULL PRIMARY KEY,
count INT NOT NULL
) ENGINE=MEMORY; [0.00022101402282715 sec]
INSERT IGNORE INTO tmp_counts_941ncji9ed69qulgtu8pvtsh8u_6a2ab95cea249 (sub_icon_id, count)
SELECT
sub_icon_id,
COUNT(DISTINCT entry) AS count
FROM (
SELECT A.entry, A.sub_icon_id
FROM tmp_A_941ncji9ed69qulgtu8pvtsh8u_6a2ab95cea249 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.00027608871459961 sec]
SELECT
c.sub_icon_id AS id,
c.count,
si.entry,
si.name_ua AS name,
si.url
FROM tmp_counts_941ncji9ed69qulgtu8pvtsh8u_6a2ab95cea249 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.00023603439331055 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_941ncji9ed69qulgtu8pvtsh8u_6a2ab95cea249 [0.00021481513977051 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_941ncji9ed69qulgtu8pvtsh8u_6a2ab95cea249 [9.1791152954102E-5 sec]
DEVELOPMENT🌷ЗНИЖКИ ДО 70%
ПЕРЕЙТИ
Виробник: Super Wings (КНР)
Виробник: Super Wings (КНР)
Виробник: Super Wings (КНР)
Виробник: Picasso (США)
Виробник: Tigres (Украина)