Конструктор для девочек 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_7-o_8-developing-transformery-super_wings.html' LIMIT 0,1 [0.00056004524230957 sec]
SELECT pod_filter.id,pod_filter.url FROM pod_filter WHERE BINARY pod_filter.url IN ('o_7','o_8','developing','transformery','super_wings') order by url [0.0010528564453125 sec]
SELECT pod_sub_icon.id,pod_sub_icon.url FROM pod_sub_icon WHERE BINARY pod_sub_icon.url IN ('o_7','o_8','developing','transformery','super_wings') order by url [0.00071287155151367 sec]
select id,url from pod_cat_brand where BINARY url IN ('o_7','o_8','developing','transformery','super_wings') [0.0012660026550293 sec]
SELECT id, url FROM pod_filter WHERE url IN ('o_7','o_8','developing','transformery','super_wings') [0.00082015991210938 sec]
SELECT id, url FROM pod_sub_icon WHERE url IN ('o_7','o_8','developing','transformery','super_wings') [0.00052213668823242 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 (463,365,366,3460) and f.is_active AND mf.is_active
ORDER BY mf.id, f.id [0.00033998489379883 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 (365,366)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (463)
INNER JOIN pod_good_filter gf2 ON g.id = gf2.id_good AND gf2.filter_id_value in (3460)
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 (365,366)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (463)
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 (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 (365,366)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (463)
INNER JOIN pod_good_filter gf2 ON g.id = gf2.id_good AND gf2.filter_id_value in (3460)
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 (365,366)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (463)
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 (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.014057874679565 sec]
CREATE TEMPORARY TABLE temp_brand_counts_6a2aa1e8a18f4 (
id INT,
gid INT,
INDEX idx_id (id),
INDEX idx_gid (gid)
) [0.00042104721069336 sec]
INSERT INTO temp_brand_counts_6a2aa1e8a18f4 (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 (365,366)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (463)
INNER JOIN pod_good_filter gf2 ON g.id = gf2.id_good AND gf2.filter_id_value in (3460)
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 (365,366)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (463)
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 (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 (365,366)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (463)
INNER JOIN pod_good_filter gf2 ON g.id = gf2.id_good AND gf2.filter_id_value in (3460)
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 (365,366)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (463)
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 (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.0025429725646973 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_6a2aa1e8a18f4
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.00066113471984863 sec]
DROP TEMPORARY TABLE IF EXISTS temp_brand_counts_6a2aa1e8a18f4 [0.00021004676818848 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 (365,366)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (463)
INNER JOIN pod_good_filter gf2 ON g.id = gf2.id_good AND gf2.filter_id_value in (3460)
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 (365,366)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (463)
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 (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 (365,366)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (463)
INNER JOIN pod_good_filter gf2 ON g.id = gf2.id_good AND gf2.filter_id_value in (3460)
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 (365,366)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (463)
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 (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.0026490688323975 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_ku3ec2urparenoflcfutpkk7b5_6a2aa1e8a6357;
CREATE TEMPORARY TABLE tmp_A_ku3ec2urparenoflcfutpkk7b5_6a2aa1e8a6357 (
id INT NOT NULL,
PRIMARY KEY (id)
) ENGINE=MEMORY; [0.00046110153198242 sec]
INSERT INTO tmp_A_ku3ec2urparenoflcfutpkk7b5_6a2aa1e8a6357 (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 (365,366)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (463)
INNER JOIN pod_good_filter gf2 ON g.id = gf2.id_good AND gf2.filter_id_value in (3460)
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 (365,366)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (463)
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 (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 (365,366)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (463)
INNER JOIN pod_good_filter gf2 ON g.id = gf2.id_good AND gf2.filter_id_value in (3460)
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 (365,366)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (463)
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 (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.0027060508728027 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_pairs_ku3ec2urparenoflcfutpkk7b5_6a2aa1e8a6357;
CREATE TEMPORARY TABLE tmp_pairs_ku3ec2urparenoflcfutpkk7b5_6a2aa1e8a6357 (
goods_id INT NOT NULL,
filter_id INT NOT NULL,
PRIMARY KEY (goods_id, filter_id)
) ENGINE=MEMORY; [0.00030398368835449 sec]
INSERT INTO tmp_pairs_ku3ec2urparenoflcfutpkk7b5_6a2aa1e8a6357 (goods_id, filter_id)
SELECT DISTINCT
A.id AS goods_id,
f.id AS filter_id
FROM tmp_A_ku3ec2urparenoflcfutpkk7b5_6a2aa1e8a6357 A
INNER JOIN pod_good_filter gf ON A.id = gf.id_good AND gf.filter_id_value NOT IN (365,366,463,3460)
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.0036849975585938 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_ku3ec2urparenoflcfutpkk7b5_6a2aa1e8a6357;
CREATE TEMPORARY TABLE tmp_counts_ku3ec2urparenoflcfutpkk7b5_6a2aa1e8a6357 (
filter_id INT NOT NULL PRIMARY KEY,
count INT NOT NULL
) ENGINE=MEMORY; [0.00039887428283691 sec]
INSERT IGNORE INTO tmp_counts_ku3ec2urparenoflcfutpkk7b5_6a2aa1e8a6357 (filter_id, count)
SELECT
p.filter_id,
COUNT(*) AS count
FROM tmp_pairs_ku3ec2urparenoflcfutpkk7b5_6a2aa1e8a6357 p
GROUP BY p.filter_id [0.00037693977355957 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_ku3ec2urparenoflcfutpkk7b5_6a2aa1e8a6357 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_ku3ec2urparenoflcfutpkk7b5_6a2aa1e8a6357 [0.00032997131347656 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_pairs_ku3ec2urparenoflcfutpkk7b5_6a2aa1e8a6357 [0.00015497207641602 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_ku3ec2urparenoflcfutpkk7b5_6a2aa1e8a6357 [0.00014209747314453 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_ku3ec2urparenoflcfutpkk7b5_6a2aa1e8a8bf8;
CREATE TEMPORARY TABLE tmp_A_ku3ec2urparenoflcfutpkk7b5_6a2aa1e8a8bf8 (
id INT NOT NULL,
entry INT NOT NULL,
PRIMARY KEY (id),
KEY idx_entry (entry)
) ENGINE=MEMORY; [0.00031518936157227 sec]
INSERT INTO tmp_A_ku3ec2urparenoflcfutpkk7b5_6a2aa1e8a8bf8 (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 (365,366)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (463)
INNER JOIN pod_good_filter gf2 ON g.id = gf2.id_good AND gf2.filter_id_value in (3460)
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 (365,366)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (463)
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 (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 (365,366)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (463)
INNER JOIN pod_good_filter gf2 ON g.id = gf2.id_good AND gf2.filter_id_value in (3460)
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 (365,366)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (463)
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 (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.0024769306182861 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_pairs_ku3ec2urparenoflcfutpkk7b5_6a2aa1e8a8bf8;
CREATE TEMPORARY TABLE tmp_pairs_ku3ec2urparenoflcfutpkk7b5_6a2aa1e8a8bf8 (
goods_id INT NOT NULL,
filter_id INT NOT NULL,
PRIMARY KEY (goods_id, filter_id)
) ENGINE=MEMORY; [0.00037002563476562 sec]
INSERT INTO tmp_pairs_ku3ec2urparenoflcfutpkk7b5_6a2aa1e8a8bf8 (goods_id, filter_id)
SELECT DISTINCT
A.entry AS goods_id,
f.id AS filter_id
FROM tmp_A_ku3ec2urparenoflcfutpkk7b5_6a2aa1e8a8bf8 A
INNER JOIN pod_good_filter gf ON A.id = gf.id_good AND gf.filter_id_value NOT IN (365,366,463,3460)
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.0010700225830078 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_ku3ec2urparenoflcfutpkk7b5_6a2aa1e8a8bf8;
CREATE TEMPORARY TABLE tmp_counts_ku3ec2urparenoflcfutpkk7b5_6a2aa1e8a8bf8 (
filter_id INT NOT NULL PRIMARY KEY,
count INT NOT NULL
) ENGINE=MEMORY; [0.0003669261932373 sec]
INSERT IGNORE INTO tmp_counts_ku3ec2urparenoflcfutpkk7b5_6a2aa1e8a8bf8 (filter_id, count)
SELECT
p.filter_id,
COUNT(*) AS count
FROM tmp_pairs_ku3ec2urparenoflcfutpkk7b5_6a2aa1e8a8bf8 p
GROUP BY p.filter_id [0.00037217140197754 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_ku3ec2urparenoflcfutpkk7b5_6a2aa1e8a8bf8 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.00038886070251465 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_ku3ec2urparenoflcfutpkk7b5_6a2aa1e8a8bf8 [0.00029182434082031 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_pairs_ku3ec2urparenoflcfutpkk7b5_6a2aa1e8a8bf8 [0.00013113021850586 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_ku3ec2urparenoflcfutpkk7b5_6a2aa1e8a8bf8 [0.00011301040649414 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_ku3ec2urparenoflcfutpkk7b5_6a2aa1e8aaabf;
CREATE TEMPORARY TABLE tmp_A_ku3ec2urparenoflcfutpkk7b5_6a2aa1e8aaabf (
id INT NOT NULL,
entry INT NOT NULL,
PRIMARY KEY (id),
KEY idx_entry (entry)
) ENGINE=MEMORY [0.00026893615722656 sec]
INSERT INTO tmp_A_ku3ec2urparenoflcfutpkk7b5_6a2aa1e8aaabf (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)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (3460)
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)
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 (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)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (3460)
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)
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 (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.0023097991943359 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_pairs_ku3ec2urparenoflcfutpkk7b5_6a2aa1e8aaabf;
CREATE TEMPORARY TABLE tmp_pairs_ku3ec2urparenoflcfutpkk7b5_6a2aa1e8aaabf (
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_6a2aa1e8aaabf (goods_id, filter_id)
SELECT DISTINCT
A.entry AS goods_id,
f.id AS filter_id
FROM tmp_A_ku3ec2urparenoflcfutpkk7b5_6a2aa1e8aaabf 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.00073695182800293 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_ku3ec2urparenoflcfutpkk7b5_6a2aa1e8aaabf;
CREATE TEMPORARY TABLE tmp_counts_ku3ec2urparenoflcfutpkk7b5_6a2aa1e8aaabf (
filter_id INT NOT NULL PRIMARY KEY,
count INT NOT NULL
) ENGINE=MEMORY [0.0003972053527832 sec]
INSERT INTO tmp_counts_ku3ec2urparenoflcfutpkk7b5_6a2aa1e8aaabf (filter_id, count)
SELECT
p.filter_id,
COUNT(*) AS count
FROM tmp_pairs_ku3ec2urparenoflcfutpkk7b5_6a2aa1e8aaabf p
GROUP BY p.filter_id [0.0003509521484375 sec]
INSERT INTO tmp_counts_ku3ec2urparenoflcfutpkk7b5_6a2aa1e8aaabf (filter_id, count)
SELECT pf.id, 0
FROM pod_filter pf
LEFT JOIN tmp_counts_ku3ec2urparenoflcfutpkk7b5_6a2aa1e8aaabf c ON c.filter_id = pf.id
WHERE pf.id in (365,366) AND c.filter_id IS NULL [0.0003349781036377 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_ku3ec2urparenoflcfutpkk7b5_6a2aa1e8aaabf 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.00043892860412598 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_ku3ec2urparenoflcfutpkk7b5_6a2aa1e8aaabf [0.00036191940307617 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_pairs_ku3ec2urparenoflcfutpkk7b5_6a2aa1e8aaabf [0.00013208389282227 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_ku3ec2urparenoflcfutpkk7b5_6a2aa1e8aaabf [0.00011610984802246 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 (365,366,3460) and f.is_active AND mf.is_active
ORDER BY mf.id, f.id [0.00048089027404785 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_ku3ec2urparenoflcfutpkk7b5_6a2aa1e8acd04;
CREATE TEMPORARY TABLE tmp_A_ku3ec2urparenoflcfutpkk7b5_6a2aa1e8acd04 (
id INT NOT NULL,
PRIMARY KEY (id)
) ENGINE=MEMORY; [0.00034499168395996 sec]
INSERT INTO tmp_A_ku3ec2urparenoflcfutpkk7b5_6a2aa1e8acd04 (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 (365,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 (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 (365,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 (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 (365,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 (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 (365,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 (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.00199294090271 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_pairs_ku3ec2urparenoflcfutpkk7b5_6a2aa1e8acd04;
CREATE TEMPORARY TABLE tmp_pairs_ku3ec2urparenoflcfutpkk7b5_6a2aa1e8acd04 (
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_ku3ec2urparenoflcfutpkk7b5_6a2aa1e8acd04 (goods_id, filter_id)
SELECT DISTINCT
A.id AS goods_id,
f.id AS filter_id
FROM tmp_A_ku3ec2urparenoflcfutpkk7b5_6a2aa1e8acd04 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.00077009201049805 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_ku3ec2urparenoflcfutpkk7b5_6a2aa1e8acd04;
CREATE TEMPORARY TABLE tmp_counts_ku3ec2urparenoflcfutpkk7b5_6a2aa1e8acd04 (
filter_id INT NOT NULL PRIMARY KEY,
count INT NOT NULL
) ENGINE=MEMORY; [0.0003509521484375 sec]
INSERT INTO tmp_counts_ku3ec2urparenoflcfutpkk7b5_6a2aa1e8acd04 (filter_id, count)
SELECT
p.filter_id,
COUNT(*) AS count
FROM tmp_pairs_ku3ec2urparenoflcfutpkk7b5_6a2aa1e8acd04 p
GROUP BY p.filter_id [0.00039196014404297 sec]
INSERT IGNORE INTO tmp_counts_ku3ec2urparenoflcfutpkk7b5_6a2aa1e8acd04 (filter_id, count)
SELECT pf.id, 0
FROM pod_filter pf
LEFT JOIN tmp_counts_ku3ec2urparenoflcfutpkk7b5_6a2aa1e8acd04 c ON c.filter_id = pf.id
WHERE pf.id in (463) AND c.filter_id IS NULL [0.00028800964355469 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_ku3ec2urparenoflcfutpkk7b5_6a2aa1e8acd04 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.00028109550476074 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_ku3ec2urparenoflcfutpkk7b5_6a2aa1e8acd04 [0.00025010108947754 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_pairs_ku3ec2urparenoflcfutpkk7b5_6a2aa1e8acd04 [0.00013899803161621 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_ku3ec2urparenoflcfutpkk7b5_6a2aa1e8acd04 [0.00012016296386719 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 (463,365,366) and f.is_active AND mf.is_active
ORDER BY mf.id, f.id [0.00050497055053711 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_ku3ec2urparenoflcfutpkk7b5_6a2aa1e8aebbd;
CREATE TEMPORARY TABLE tmp_A_ku3ec2urparenoflcfutpkk7b5_6a2aa1e8aebbd (
id INT NOT NULL,
PRIMARY KEY (id)
) ENGINE=MEMORY; [0.00033903121948242 sec]
INSERT INTO tmp_A_ku3ec2urparenoflcfutpkk7b5_6a2aa1e8aebbd (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 (365,366)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (463)
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 (365,366)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (463)
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 (365,366)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (463)
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 (365,366)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (463)
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.0030081272125244 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_pairs_ku3ec2urparenoflcfutpkk7b5_6a2aa1e8aebbd;
CREATE TEMPORARY TABLE tmp_pairs_ku3ec2urparenoflcfutpkk7b5_6a2aa1e8aebbd (
goods_id INT NOT NULL,
filter_id INT NOT NULL,
PRIMARY KEY (goods_id, filter_id)
) ENGINE=MEMORY; [0.00043177604675293 sec]
INSERT INTO tmp_pairs_ku3ec2urparenoflcfutpkk7b5_6a2aa1e8aebbd (goods_id, filter_id)
SELECT DISTINCT
A.id AS goods_id,
f.id AS filter_id
FROM tmp_A_ku3ec2urparenoflcfutpkk7b5_6a2aa1e8aebbd 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.0057170391082764 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_ku3ec2urparenoflcfutpkk7b5_6a2aa1e8aebbd;
CREATE TEMPORARY TABLE tmp_counts_ku3ec2urparenoflcfutpkk7b5_6a2aa1e8aebbd (
filter_id INT NOT NULL PRIMARY KEY,
count INT NOT NULL
) ENGINE=MEMORY; [0.00099992752075195 sec]
INSERT INTO tmp_counts_ku3ec2urparenoflcfutpkk7b5_6a2aa1e8aebbd (filter_id, count)
SELECT
p.filter_id,
COUNT(*) AS count
FROM tmp_pairs_ku3ec2urparenoflcfutpkk7b5_6a2aa1e8aebbd p
GROUP BY p.filter_id [0.0010008811950684 sec]
INSERT IGNORE INTO tmp_counts_ku3ec2urparenoflcfutpkk7b5_6a2aa1e8aebbd (filter_id, count)
SELECT pf.id, 0
FROM pod_filter pf
LEFT JOIN tmp_counts_ku3ec2urparenoflcfutpkk7b5_6a2aa1e8aebbd c ON c.filter_id = pf.id
WHERE pf.id in (3460) AND c.filter_id IS NULL [0.00022602081298828 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_ku3ec2urparenoflcfutpkk7b5_6a2aa1e8aebbd 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.00018501281738281 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_ku3ec2urparenoflcfutpkk7b5_6a2aa1e8aebbd [0.00014805793762207 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_pairs_ku3ec2urparenoflcfutpkk7b5_6a2aa1e8aebbd [8.2969665527344E-5 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_ku3ec2urparenoflcfutpkk7b5_6a2aa1e8aebbd [7.6770782470703E-5 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_ku3ec2urparenoflcfutpkk7b5_6a2aa1e8b2075;
CREATE TEMPORARY TABLE tmp_A_ku3ec2urparenoflcfutpkk7b5_6a2aa1e8b2075 (
entry INT NOT NULL,
sub_icon_id INT NOT NULL,
PRIMARY KEY (entry, sub_icon_id)
) ENGINE=MEMORY; [0.00043201446533203 sec]
INSERT IGNORE INTO tmp_A_ku3ec2urparenoflcfutpkk7b5_6a2aa1e8b2075 (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 (365,366)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (463)
INNER JOIN pod_good_filter gf2 ON g.id = gf2.id_good AND gf2.filter_id_value in (3460)
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 (365,366)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (463)
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 (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 (365,366)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (463)
INNER JOIN pod_good_filter gf2 ON g.id = gf2.id_good AND gf2.filter_id_value in (3460)
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 (365,366)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (463)
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 (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.0031599998474121 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_ku3ec2urparenoflcfutpkk7b5_6a2aa1e8b2075;
CREATE TEMPORARY TABLE tmp_counts_ku3ec2urparenoflcfutpkk7b5_6a2aa1e8b2075 (
sub_icon_id INT NOT NULL PRIMARY KEY,
count INT NOT NULL
) ENGINE=MEMORY; [0.00038599967956543 sec]
INSERT IGNORE INTO tmp_counts_ku3ec2urparenoflcfutpkk7b5_6a2aa1e8b2075 (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_6a2aa1e8b2075 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.00051999092102051 sec]
SELECT
c.sub_icon_id AS id,
c.count,
si.entry,
si.name AS name,
si.url
FROM tmp_counts_ku3ec2urparenoflcfutpkk7b5_6a2aa1e8b2075 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.00042390823364258 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_ku3ec2urparenoflcfutpkk7b5_6a2aa1e8b2075 [0.00032210350036621 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_ku3ec2urparenoflcfutpkk7b5_6a2aa1e8b2075 [0.00012493133544922 sec]
DEVELOPMENT🌷СКИДКИ ДО 70%
ПЕРЕЙТИ
Производитель: Super Wings (КНР)
Производитель: Super Wings (КНР)
Производитель: Super Wings (КНР)