Конструктор для девочек Super Wings
Производитель: Super Wings (КНР)
Производитель: Super Wings (КНР)
Производитель: Super Wings (КНР)
SELECT url_to, r404
FROM pod_redirect
WHERE BINARY REPLACE(url_from,'/ru/','/') = '/konstruktor_dlya_devochek/o_6-o_9-developing-constructor_sets-super_wings.html' LIMIT 0,1 [0.0012609958648682 sec]
SELECT pod_filter.id,pod_filter.url FROM pod_filter WHERE BINARY pod_filter.url IN ('o_6','o_9','developing','constructor_sets','super_wings') order by url [0.0017020702362061 sec]
SELECT pod_sub_icon.id,pod_sub_icon.url FROM pod_sub_icon WHERE BINARY pod_sub_icon.url IN ('o_6','o_9','developing','constructor_sets','super_wings') order by url [0.001284122467041 sec]
select id,url from pod_cat_brand where BINARY url IN ('o_6','o_9','developing','constructor_sets','super_wings') [0.00199294090271 sec]
SELECT id, url FROM pod_filter WHERE url IN ('o_6','o_9','developing','constructor_sets','super_wings') [0.00094389915466309 sec]
SELECT id, url FROM pod_sub_icon WHERE url IN ('o_6','o_9','developing','constructor_sets','super_wings') [0.000823974609375 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,367)
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.brand_id IN (2499) 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,367)
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.brand_id IN (2499) 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,367)
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.brand_id IN (2499) 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,367)
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.brand_id IN (2499) AND
go.is_present AND go.is_active AND g.is_present_all_mods AND g.is_active
[0.015702962875366 sec]
CREATE TEMPORARY TABLE temp_brand_counts_6a2a7c89c46f3 (
id INT,
gid INT,
INDEX idx_id (id),
INDEX idx_gid (gid)
) [0.0017399787902832 sec]
INSERT INTO temp_brand_counts_6a2a7c89c46f3 (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,367)
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.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,367)
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.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,367)
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.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,367)
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
UNION
SELECT id, null gid
FROM pod_cat_category
WHERE id in (2499) [0.074050188064575 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_6a2a7c89c46f3
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.00031876564025879 sec]
DROP TEMPORARY TABLE IF EXISTS temp_brand_counts_6a2a7c89c46f3 [9.1791152954102E-5 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,367)
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.brand_id IN (2499) 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,367)
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.brand_id IN (2499) 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,367)
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.brand_id IN (2499) 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,367)
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.brand_id IN (2499) AND
go.is_present AND go.is_active AND g.is_present_all_mods AND g.is_active
) A
[0.0039780139923096 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_c3vgpsmnccpmulr4dua0i7i0j3_6a2a7c89db770;
CREATE TEMPORARY TABLE tmp_A_c3vgpsmnccpmulr4dua0i7i0j3_6a2a7c89db770 (
id INT NOT NULL,
PRIMARY KEY (id)
) ENGINE=MEMORY; [0.00037312507629395 sec]
INSERT INTO tmp_A_c3vgpsmnccpmulr4dua0i7i0j3_6a2a7c89db770 (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,367)
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.brand_id IN (2499) 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,367)
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.brand_id IN (2499) 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,367)
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.brand_id IN (2499) 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,367)
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.brand_id IN (2499) AND
go.is_present AND go.is_active AND g.is_present_all_mods AND g.is_active
) A [0.007612943649292 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_pairs_c3vgpsmnccpmulr4dua0i7i0j3_6a2a7c89db770;
CREATE TEMPORARY TABLE tmp_pairs_c3vgpsmnccpmulr4dua0i7i0j3_6a2a7c89db770 (
goods_id INT NOT NULL,
filter_id INT NOT NULL,
PRIMARY KEY (goods_id, filter_id)
) ENGINE=MEMORY; [0.0003211498260498 sec]
INSERT INTO tmp_pairs_c3vgpsmnccpmulr4dua0i7i0j3_6a2a7c89db770 (goods_id, filter_id)
SELECT DISTINCT
A.id AS goods_id,
f.id AS filter_id
FROM tmp_A_c3vgpsmnccpmulr4dua0i7i0j3_6a2a7c89db770 A
INNER JOIN pod_good_filter gf ON A.id = gf.id_good AND gf.filter_id_value NOT IN (364,367,463,466)
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.018090963363647 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_c3vgpsmnccpmulr4dua0i7i0j3_6a2a7c89db770;
CREATE TEMPORARY TABLE tmp_counts_c3vgpsmnccpmulr4dua0i7i0j3_6a2a7c89db770 (
filter_id INT NOT NULL PRIMARY KEY,
count INT NOT NULL
) ENGINE=MEMORY; [0.0004119873046875 sec]
INSERT IGNORE INTO tmp_counts_c3vgpsmnccpmulr4dua0i7i0j3_6a2a7c89db770 (filter_id, count)
SELECT
p.filter_id,
COUNT(*) AS count
FROM tmp_pairs_c3vgpsmnccpmulr4dua0i7i0j3_6a2a7c89db770 p
GROUP BY p.filter_id [0.00041103363037109 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_c3vgpsmnccpmulr4dua0i7i0j3_6a2a7c89db770 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.00046706199645996 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_c3vgpsmnccpmulr4dua0i7i0j3_6a2a7c89db770 [0.00027084350585938 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_pairs_c3vgpsmnccpmulr4dua0i7i0j3_6a2a7c89db770 [0.0001380443572998 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_c3vgpsmnccpmulr4dua0i7i0j3_6a2a7c89db770 [0.00013113021850586 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_c3vgpsmnccpmulr4dua0i7i0j3_6a2a7c89e2af0;
CREATE TEMPORARY TABLE tmp_A_c3vgpsmnccpmulr4dua0i7i0j3_6a2a7c89e2af0 (
id INT NOT NULL,
entry INT NOT NULL,
PRIMARY KEY (id),
KEY idx_entry (entry)
) ENGINE=MEMORY; [0.00028085708618164 sec]
INSERT INTO tmp_A_c3vgpsmnccpmulr4dua0i7i0j3_6a2a7c89e2af0 (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,367)
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.brand_id IN (2499) 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,367)
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.brand_id IN (2499) 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,367)
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.brand_id IN (2499) 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,367)
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.brand_id IN (2499) AND
go.is_present AND go.is_active AND g.is_present_all_mods AND g.is_active
) A [0.0023608207702637 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_pairs_c3vgpsmnccpmulr4dua0i7i0j3_6a2a7c89e2af0;
CREATE TEMPORARY TABLE tmp_pairs_c3vgpsmnccpmulr4dua0i7i0j3_6a2a7c89e2af0 (
goods_id INT NOT NULL,
filter_id INT NOT NULL,
PRIMARY KEY (goods_id, filter_id)
) ENGINE=MEMORY; [0.00038719177246094 sec]
INSERT INTO tmp_pairs_c3vgpsmnccpmulr4dua0i7i0j3_6a2a7c89e2af0 (goods_id, filter_id)
SELECT DISTINCT
A.entry AS goods_id,
f.id AS filter_id
FROM tmp_A_c3vgpsmnccpmulr4dua0i7i0j3_6a2a7c89e2af0 A
INNER JOIN pod_good_filter gf ON A.id = gf.id_good AND gf.filter_id_value NOT IN (364,367,463,466)
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.0008699893951416 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_c3vgpsmnccpmulr4dua0i7i0j3_6a2a7c89e2af0;
CREATE TEMPORARY TABLE tmp_counts_c3vgpsmnccpmulr4dua0i7i0j3_6a2a7c89e2af0 (
filter_id INT NOT NULL PRIMARY KEY,
count INT NOT NULL
) ENGINE=MEMORY; [0.00037312507629395 sec]
INSERT IGNORE INTO tmp_counts_c3vgpsmnccpmulr4dua0i7i0j3_6a2a7c89e2af0 (filter_id, count)
SELECT
p.filter_id,
COUNT(*) AS count
FROM tmp_pairs_c3vgpsmnccpmulr4dua0i7i0j3_6a2a7c89e2af0 p
GROUP BY p.filter_id [0.00033688545227051 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_c3vgpsmnccpmulr4dua0i7i0j3_6a2a7c89e2af0 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.00040793418884277 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_c3vgpsmnccpmulr4dua0i7i0j3_6a2a7c89e2af0 [0.00026416778564453 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_pairs_c3vgpsmnccpmulr4dua0i7i0j3_6a2a7c89e2af0 [0.00015997886657715 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_c3vgpsmnccpmulr4dua0i7i0j3_6a2a7c89e2af0 [0.00015902519226074 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_c3vgpsmnccpmulr4dua0i7i0j3_6a2a7c89e479b;
CREATE TEMPORARY TABLE tmp_A_c3vgpsmnccpmulr4dua0i7i0j3_6a2a7c89e479b (
id INT NOT NULL,
entry INT NOT NULL,
PRIMARY KEY (id),
KEY idx_entry (entry)
) ENGINE=MEMORY [0.00028014183044434 sec]
INSERT INTO tmp_A_c3vgpsmnccpmulr4dua0i7i0j3_6a2a7c89e479b (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 (447) AND
g.brand_id IN (2499) 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 (447) AND
g.brand_id IN (2499) 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 (447) AND
g.brand_id IN (2499) 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 (447) AND
g.brand_id IN (2499) AND
go.is_present AND go.is_active AND g.is_present_all_mods AND g.is_active
) A [0.0019240379333496 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_pairs_c3vgpsmnccpmulr4dua0i7i0j3_6a2a7c89e479b;
CREATE TEMPORARY TABLE tmp_pairs_c3vgpsmnccpmulr4dua0i7i0j3_6a2a7c89e479b (
goods_id INT NOT NULL,
filter_id INT NOT NULL,
PRIMARY KEY (goods_id, filter_id)
) ENGINE=MEMORY [0.00043916702270508 sec]
INSERT INTO tmp_pairs_c3vgpsmnccpmulr4dua0i7i0j3_6a2a7c89e479b (goods_id, filter_id)
SELECT DISTINCT
A.entry AS goods_id,
f.id AS filter_id
FROM tmp_A_c3vgpsmnccpmulr4dua0i7i0j3_6a2a7c89e479b 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.006019115447998 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_c3vgpsmnccpmulr4dua0i7i0j3_6a2a7c89e479b;
CREATE TEMPORARY TABLE tmp_counts_c3vgpsmnccpmulr4dua0i7i0j3_6a2a7c89e479b (
filter_id INT NOT NULL PRIMARY KEY,
count INT NOT NULL
) ENGINE=MEMORY [0.0003359317779541 sec]
INSERT INTO tmp_counts_c3vgpsmnccpmulr4dua0i7i0j3_6a2a7c89e479b (filter_id, count)
SELECT
p.filter_id,
COUNT(*) AS count
FROM tmp_pairs_c3vgpsmnccpmulr4dua0i7i0j3_6a2a7c89e479b p
GROUP BY p.filter_id [0.00032401084899902 sec]
INSERT INTO tmp_counts_c3vgpsmnccpmulr4dua0i7i0j3_6a2a7c89e479b (filter_id, count)
SELECT pf.id, 0
FROM pod_filter pf
LEFT JOIN tmp_counts_c3vgpsmnccpmulr4dua0i7i0j3_6a2a7c89e479b c ON c.filter_id = pf.id
WHERE pf.id in (364,367) AND c.filter_id IS NULL [0.00022006034851074 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_c3vgpsmnccpmulr4dua0i7i0j3_6a2a7c89e479b 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.00046086311340332 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_c3vgpsmnccpmulr4dua0i7i0j3_6a2a7c89e479b [0.00033712387084961 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_pairs_c3vgpsmnccpmulr4dua0i7i0j3_6a2a7c89e479b [0.00015091896057129 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_c3vgpsmnccpmulr4dua0i7i0j3_6a2a7c89e479b [0.00026202201843262 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_c3vgpsmnccpmulr4dua0i7i0j3_6a2a7c89e779e;
CREATE TEMPORARY TABLE tmp_A_c3vgpsmnccpmulr4dua0i7i0j3_6a2a7c89e779e (
id INT NOT NULL,
PRIMARY KEY (id)
) ENGINE=MEMORY; [0.00020813941955566 sec]
INSERT INTO tmp_A_c3vgpsmnccpmulr4dua0i7i0j3_6a2a7c89e779e (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,367)
WHERE g.cat_id IN (447) AND
g.brand_id IN (2499) 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,367)
WHERE dc.dop_cat_id IN (447) AND
g.brand_id IN (2499) 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,367)
WHERE g.cat_id IN (447) AND
g.brand_id IN (2499) 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,367)
WHERE dc.dop_cat_id IN (447) AND
g.brand_id IN (2499) AND
go.is_present AND go.is_active AND g.is_present_all_mods AND g.is_active
) A [0.00111985206604 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_pairs_c3vgpsmnccpmulr4dua0i7i0j3_6a2a7c89e779e;
CREATE TEMPORARY TABLE tmp_pairs_c3vgpsmnccpmulr4dua0i7i0j3_6a2a7c89e779e (
goods_id INT NOT NULL,
filter_id INT NOT NULL,
PRIMARY KEY (goods_id, filter_id)
) ENGINE=MEMORY; [0.00037598609924316 sec]
INSERT INTO tmp_pairs_c3vgpsmnccpmulr4dua0i7i0j3_6a2a7c89e779e (goods_id, filter_id)
SELECT DISTINCT
A.id AS goods_id,
f.id AS filter_id
FROM tmp_A_c3vgpsmnccpmulr4dua0i7i0j3_6a2a7c89e779e 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.0031719207763672 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_c3vgpsmnccpmulr4dua0i7i0j3_6a2a7c89e779e;
CREATE TEMPORARY TABLE tmp_counts_c3vgpsmnccpmulr4dua0i7i0j3_6a2a7c89e779e (
filter_id INT NOT NULL PRIMARY KEY,
count INT NOT NULL
) ENGINE=MEMORY; [0.00032210350036621 sec]
INSERT INTO tmp_counts_c3vgpsmnccpmulr4dua0i7i0j3_6a2a7c89e779e (filter_id, count)
SELECT
p.filter_id,
COUNT(*) AS count
FROM tmp_pairs_c3vgpsmnccpmulr4dua0i7i0j3_6a2a7c89e779e p
GROUP BY p.filter_id [0.00031709671020508 sec]
INSERT IGNORE INTO tmp_counts_c3vgpsmnccpmulr4dua0i7i0j3_6a2a7c89e779e (filter_id, count)
SELECT pf.id, 0
FROM pod_filter pf
LEFT JOIN tmp_counts_c3vgpsmnccpmulr4dua0i7i0j3_6a2a7c89e779e c ON c.filter_id = pf.id
WHERE pf.id in (463,466) AND c.filter_id IS NULL [0.00020289421081543 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_c3vgpsmnccpmulr4dua0i7i0j3_6a2a7c89e779e 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.00043296813964844 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_c3vgpsmnccpmulr4dua0i7i0j3_6a2a7c89e779e [0.00026702880859375 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_pairs_c3vgpsmnccpmulr4dua0i7i0j3_6a2a7c89e779e [0.00017189979553223 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_c3vgpsmnccpmulr4dua0i7i0j3_6a2a7c89e779e [0.00014901161193848 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_c3vgpsmnccpmulr4dua0i7i0j3_6a2a7c89e953b;
CREATE TEMPORARY TABLE tmp_A_c3vgpsmnccpmulr4dua0i7i0j3_6a2a7c89e953b (
entry INT NOT NULL,
sub_icon_id INT NOT NULL,
PRIMARY KEY (entry, sub_icon_id)
) ENGINE=MEMORY; [0.00035715103149414 sec]
INSERT IGNORE INTO tmp_A_c3vgpsmnccpmulr4dua0i7i0j3_6a2a7c89e953b (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,367)
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.brand_id IN (2499) 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,367)
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.brand_id IN (2499) 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,367)
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.brand_id IN (2499) 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,367)
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.brand_id IN (2499) AND
go.is_present AND go.is_active AND g.is_present_all_mods AND g.is_active
) A [0.0028219223022461 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_c3vgpsmnccpmulr4dua0i7i0j3_6a2a7c89e953b;
CREATE TEMPORARY TABLE tmp_counts_c3vgpsmnccpmulr4dua0i7i0j3_6a2a7c89e953b (
sub_icon_id INT NOT NULL PRIMARY KEY,
count INT NOT NULL
) ENGINE=MEMORY; [0.00043201446533203 sec]
INSERT IGNORE INTO tmp_counts_c3vgpsmnccpmulr4dua0i7i0j3_6a2a7c89e953b (sub_icon_id, count)
SELECT
sub_icon_id,
COUNT(DISTINCT entry) AS count
FROM (
SELECT A.entry, A.sub_icon_id
FROM tmp_A_c3vgpsmnccpmulr4dua0i7i0j3_6a2a7c89e953b 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.0004889965057373 sec]
SELECT
c.sub_icon_id AS id,
c.count,
si.entry,
si.name AS name,
si.url
FROM tmp_counts_c3vgpsmnccpmulr4dua0i7i0j3_6a2a7c89e953b 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.00028491020202637 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_c3vgpsmnccpmulr4dua0i7i0j3_6a2a7c89e953b [0.00021004676818848 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_c3vgpsmnccpmulr4dua0i7i0j3_6a2a7c89e953b [0.00015807151794434 sec]
DEVELOPMENT🌷СКИДКИ ДО 70%
ПЕРЕЙТИ
Производитель: Super Wings (КНР)
Производитель: Super Wings (КНР)
Производитель: Super Wings (КНР)