Дитячі конструктори Xtrem Bots ... Stem
Виробник: Picasso (США)
Виробник: Picasso (США)
Виробник: Picasso (США)
SELECT url_to, r404
FROM pod_redirect
WHERE BINARY REPLACE(url_from,'/ru/','/') = '/konstruktory_kits/o_6-developing-xtrem_bots-picasso-stem.html' LIMIT 0,1 [0.00029492378234863 sec]
SELECT pod_filter.id,pod_filter.url FROM pod_filter WHERE BINARY pod_filter.url IN ('o_6','developing','xtrem_bots','picasso','stem') order by url [0.00075292587280273 sec]
SELECT pod_sub_icon.id,pod_sub_icon.url FROM pod_sub_icon WHERE BINARY pod_sub_icon.url IN ('o_6','developing','xtrem_bots','picasso','stem') order by url [0.00054693222045898 sec]
select id,url from pod_cat_brand where BINARY url IN ('o_6','developing','xtrem_bots','picasso','stem') [0.00095891952514648 sec]
SELECT id, url FROM pod_filter WHERE url IN ('o_6','developing','xtrem_bots','picasso','stem') [0.00039505958557129 sec]
SELECT id, url FROM pod_sub_icon WHERE url IN ('o_6','developing','xtrem_bots','picasso','stem') [0.00044703483581543 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)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (463)
WHERE g.cat_id IN (3297,437,447,446) AND
g.brand_id IN (2460,2610,2615) 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)
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 (3297,437,447,446) AND
g.brand_id IN (2460,2610,2615) 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)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (463)
WHERE g.cat_id IN (3297,437,447,446) AND
g.brand_id IN (2460,2610,2615) 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)
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 (3297,437,447,446) AND
g.brand_id IN (2460,2610,2615) AND
go.is_present AND go.is_active AND g.is_present_all_mods AND g.is_active
[0.0062201023101807 sec]
CREATE TEMPORARY TABLE temp_brand_counts_6a2aa33c378e1 (
id INT,
gid INT,
INDEX idx_id (id),
INDEX idx_gid (gid)
) [0.0002140998840332 sec]
INSERT INTO temp_brand_counts_6a2aa33c378e1 (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)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (463)
WHERE g.cat_id IN (3297,437,447,446) AND
g.is_present AND
g.is_present_all_mods AND g.entry =0 AND g.is_active
UNION
SELECT g.brand_id AS id, g.id AS gid -- основні в допкатегорії
FROM pod_cat_good g
INNER JOIN pod_dop_cat_category dc ON dc.good_id = g.id
INNER JOIN pod_good_filter gf0 ON g.id = gf0.id_good AND gf0.filter_id_value in (364)
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 (3297,437,447,446) AND
g.is_present AND
g.is_present_all_mods AND g.entry =0 AND g.is_active
UNION
SELECT g.brand_id AS id, g.id AS gid -- підтовари
FROM
pod_cat_good go
INNER JOIN pod_cat_good g ON go.entry = g.id
INNER JOIN pod_good_filter gf0 ON go.id = gf0.id_good AND gf0.filter_id_value in (364)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (463)
WHERE g.cat_id IN (3297,437,447,446) AND
go.is_present AND go.is_active AND g.is_present_all_mods AND g.is_active
UNION
SELECT g.brand_id AS id, g.id AS gid -- підтовари в допкатегорії
FROM pod_cat_good go
INNER JOIN pod_cat_good g ON go.entry = g.id
INNER JOIN pod_dop_cat_category dc ON dc.good_id = g.id
INNER JOIN pod_good_filter gf0 ON go.id = gf0.id_good AND gf0.filter_id_value in (364)
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 (3297,437,447,446) AND
go.is_present AND go.is_active AND g.is_present_all_mods AND g.is_active
UNION
SELECT id, null gid
FROM pod_cat_category
WHERE id in (2460,2610,2615) [0.021874904632568 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_6a2aa33c378e1
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.00038886070251465 sec]
DROP TEMPORARY TABLE IF EXISTS temp_brand_counts_6a2aa33c378e1 [0.00011706352233887 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)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (463)
WHERE g.cat_id IN (3297,437,447,446) AND
g.brand_id IN (2460,2610,2615) 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)
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 (3297,437,447,446) AND
g.brand_id IN (2460,2610,2615) 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)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (463)
WHERE g.cat_id IN (3297,437,447,446) AND
g.brand_id IN (2460,2610,2615) 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)
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 (3297,437,447,446) AND
g.brand_id IN (2460,2610,2615) AND
go.is_present AND go.is_active AND g.is_present_all_mods AND g.is_active
) A
[0.0022668838500977 sec]
SELECT name_ua AS name, url FROM pod_cat_brand WHERE id in (2460,2610,2615) [0.00023913383483887 sec]
SELECT name_ua AS name, url FROM pod_cat_brand WHERE id='2460.2610.2615' [0.00025606155395508 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_ot4h35195miouscn4fns4173qs_6a2aa33c3f90e;
CREATE TEMPORARY TABLE tmp_A_ot4h35195miouscn4fns4173qs_6a2aa33c3f90e (
id INT NOT NULL,
PRIMARY KEY (id)
) ENGINE=MEMORY; [0.0003509521484375 sec]
INSERT INTO tmp_A_ot4h35195miouscn4fns4173qs_6a2aa33c3f90e (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)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (463)
WHERE g.cat_id IN (3297,437,447,446) AND
g.brand_id IN (2460,2610,2615) 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)
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 (3297,437,447,446) AND
g.brand_id IN (2460,2610,2615) 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)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (463)
WHERE g.cat_id IN (3297,437,447,446) AND
g.brand_id IN (2460,2610,2615) 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)
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 (3297,437,447,446) AND
g.brand_id IN (2460,2610,2615) AND
go.is_present AND go.is_active AND g.is_present_all_mods AND g.is_active
) A [0.0054340362548828 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_pairs_ot4h35195miouscn4fns4173qs_6a2aa33c3f90e;
CREATE TEMPORARY TABLE tmp_pairs_ot4h35195miouscn4fns4173qs_6a2aa33c3f90e (
goods_id INT NOT NULL,
filter_id INT NOT NULL,
PRIMARY KEY (goods_id, filter_id)
) ENGINE=MEMORY; [0.00023007392883301 sec]
INSERT INTO tmp_pairs_ot4h35195miouscn4fns4173qs_6a2aa33c3f90e (goods_id, filter_id)
SELECT DISTINCT
A.id AS goods_id,
f.id AS filter_id
FROM tmp_A_ot4h35195miouscn4fns4173qs_6a2aa33c3f90e A
INNER JOIN pod_good_filter gf ON A.id = gf.id_good AND gf.filter_id_value NOT IN (364,463)
INNER JOIN pod_cat_filter cf ON gf.filter_id = cf.filter_id AND cf.category_id = 3297
INNER JOIN pod_filter fm ON gf.filter_id = fm.id AND fm.is_split = 0 AND fm.is_active
INNER JOIN pod_filter f ON gf.filter_id_value = f.id AND f.is_active [0.0057032108306885 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_ot4h35195miouscn4fns4173qs_6a2aa33c3f90e;
CREATE TEMPORARY TABLE tmp_counts_ot4h35195miouscn4fns4173qs_6a2aa33c3f90e (
filter_id INT NOT NULL PRIMARY KEY,
count INT NOT NULL
) ENGINE=MEMORY; [0.00030183792114258 sec]
INSERT IGNORE INTO tmp_counts_ot4h35195miouscn4fns4173qs_6a2aa33c3f90e (filter_id, count)
SELECT
p.filter_id,
COUNT(*) AS count
FROM tmp_pairs_ot4h35195miouscn4fns4173qs_6a2aa33c3f90e p
GROUP BY p.filter_id [0.00026392936706543 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_ot4h35195miouscn4fns4173qs_6a2aa33c3f90e 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.00024986267089844 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_ot4h35195miouscn4fns4173qs_6a2aa33c3f90e [0.0001680850982666 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_pairs_ot4h35195miouscn4fns4173qs_6a2aa33c3f90e [7.7009201049805E-5 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_ot4h35195miouscn4fns4173qs_6a2aa33c3f90e [7.3909759521484E-5 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_ot4h35195miouscn4fns4173qs_6a2aa33c42ed4;
CREATE TEMPORARY TABLE tmp_A_ot4h35195miouscn4fns4173qs_6a2aa33c42ed4 (
id INT NOT NULL,
entry INT NOT NULL,
PRIMARY KEY (id),
KEY idx_entry (entry)
) ENGINE=MEMORY; [0.00017690658569336 sec]
INSERT INTO tmp_A_ot4h35195miouscn4fns4173qs_6a2aa33c42ed4 (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)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (463)
WHERE g.cat_id IN (3297,437,447,446) AND
g.brand_id IN (2460,2610,2615) 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)
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 (3297,437,447,446) AND
g.brand_id IN (2460,2610,2615) 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)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (463)
WHERE g.cat_id IN (3297,437,447,446) AND
g.brand_id IN (2460,2610,2615) 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)
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 (3297,437,447,446) AND
g.brand_id IN (2460,2610,2615) AND
go.is_present AND go.is_active AND g.is_present_all_mods AND g.is_active
) A [0.0023119449615479 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_pairs_ot4h35195miouscn4fns4173qs_6a2aa33c42ed4;
CREATE TEMPORARY TABLE tmp_pairs_ot4h35195miouscn4fns4173qs_6a2aa33c42ed4 (
goods_id INT NOT NULL,
filter_id INT NOT NULL,
PRIMARY KEY (goods_id, filter_id)
) ENGINE=MEMORY; [0.00021100044250488 sec]
INSERT INTO tmp_pairs_ot4h35195miouscn4fns4173qs_6a2aa33c42ed4 (goods_id, filter_id)
SELECT DISTINCT
A.entry AS goods_id,
f.id AS filter_id
FROM tmp_A_ot4h35195miouscn4fns4173qs_6a2aa33c42ed4 A
INNER JOIN pod_good_filter gf ON A.id = gf.id_good AND gf.filter_id_value NOT IN (364,463)
INNER JOIN pod_cat_filter cf ON gf.filter_id = cf.filter_id AND cf.category_id = 3297
INNER JOIN pod_filter fm ON gf.filter_id = fm.id AND fm.is_split = 1 AND fm.is_active
INNER JOIN pod_filter f ON gf.filter_id_value = f.id AND f.is_active [0.00061821937561035 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_ot4h35195miouscn4fns4173qs_6a2aa33c42ed4;
CREATE TEMPORARY TABLE tmp_counts_ot4h35195miouscn4fns4173qs_6a2aa33c42ed4 (
filter_id INT NOT NULL PRIMARY KEY,
count INT NOT NULL
) ENGINE=MEMORY; [0.00019502639770508 sec]
INSERT IGNORE INTO tmp_counts_ot4h35195miouscn4fns4173qs_6a2aa33c42ed4 (filter_id, count)
SELECT
p.filter_id,
COUNT(*) AS count
FROM tmp_pairs_ot4h35195miouscn4fns4173qs_6a2aa33c42ed4 p
GROUP BY p.filter_id [0.00020003318786621 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_ot4h35195miouscn4fns4173qs_6a2aa33c42ed4 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.00023794174194336 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_ot4h35195miouscn4fns4173qs_6a2aa33c42ed4 [0.00017881393432617 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_pairs_ot4h35195miouscn4fns4173qs_6a2aa33c42ed4 [6.9141387939453E-5 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_ot4h35195miouscn4fns4173qs_6a2aa33c42ed4 [7.3909759521484E-5 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_ot4h35195miouscn4fns4173qs_6a2aa33c44413;
CREATE TEMPORARY TABLE tmp_A_ot4h35195miouscn4fns4173qs_6a2aa33c44413 (
id INT NOT NULL,
entry INT NOT NULL,
PRIMARY KEY (id),
KEY idx_entry (entry)
) ENGINE=MEMORY [0.00014400482177734 sec]
INSERT INTO tmp_A_ot4h35195miouscn4fns4173qs_6a2aa33c44413 (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)
WHERE g.cat_id IN (3297,437,447,446) AND
g.brand_id IN (2460,2610,2615) 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)
WHERE dc.dop_cat_id IN (3297,437,447,446) AND
g.brand_id IN (2460,2610,2615) 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)
WHERE g.cat_id IN (3297,437,447,446) AND
g.brand_id IN (2460,2610,2615) 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)
WHERE dc.dop_cat_id IN (3297,437,447,446) AND
g.brand_id IN (2460,2610,2615) AND
go.is_present AND go.is_active AND g.is_present_all_mods AND g.is_active
) A [0.0014050006866455 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_pairs_ot4h35195miouscn4fns4173qs_6a2aa33c44413;
CREATE TEMPORARY TABLE tmp_pairs_ot4h35195miouscn4fns4173qs_6a2aa33c44413 (
goods_id INT NOT NULL,
filter_id INT NOT NULL,
PRIMARY KEY (goods_id, filter_id)
) ENGINE=MEMORY [0.00019192695617676 sec]
INSERT INTO tmp_pairs_ot4h35195miouscn4fns4173qs_6a2aa33c44413 (goods_id, filter_id)
SELECT DISTINCT
A.entry AS goods_id,
f.id AS filter_id
FROM tmp_A_ot4h35195miouscn4fns4173qs_6a2aa33c44413 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.00039100646972656 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_ot4h35195miouscn4fns4173qs_6a2aa33c44413;
CREATE TEMPORARY TABLE tmp_counts_ot4h35195miouscn4fns4173qs_6a2aa33c44413 (
filter_id INT NOT NULL PRIMARY KEY,
count INT NOT NULL
) ENGINE=MEMORY [0.00016498565673828 sec]
INSERT INTO tmp_counts_ot4h35195miouscn4fns4173qs_6a2aa33c44413 (filter_id, count)
SELECT
p.filter_id,
COUNT(*) AS count
FROM tmp_pairs_ot4h35195miouscn4fns4173qs_6a2aa33c44413 p
GROUP BY p.filter_id [0.00017094612121582 sec]
INSERT INTO tmp_counts_ot4h35195miouscn4fns4173qs_6a2aa33c44413 (filter_id, count)
SELECT pf.id, 0
FROM pod_filter pf
LEFT JOIN tmp_counts_ot4h35195miouscn4fns4173qs_6a2aa33c44413 c ON c.filter_id = pf.id
WHERE pf.id in (364) AND c.filter_id IS NULL [0.00016498565673828 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_ot4h35195miouscn4fns4173qs_6a2aa33c44413 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.00020194053649902 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_ot4h35195miouscn4fns4173qs_6a2aa33c44413 [0.00016212463378906 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_pairs_ot4h35195miouscn4fns4173qs_6a2aa33c44413 [7.7962875366211E-5 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_ot4h35195miouscn4fns4173qs_6a2aa33c44413 [6.8902969360352E-5 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_ot4h35195miouscn4fns4173qs_6a2aa33c454cb;
CREATE TEMPORARY TABLE tmp_A_ot4h35195miouscn4fns4173qs_6a2aa33c454cb (
id INT NOT NULL,
PRIMARY KEY (id)
) ENGINE=MEMORY; [0.00015401840209961 sec]
INSERT INTO tmp_A_ot4h35195miouscn4fns4173qs_6a2aa33c454cb (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)
WHERE g.cat_id IN (3297,437,447,446) AND
g.brand_id IN (2460,2610,2615) 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)
WHERE dc.dop_cat_id IN (3297,437,447,446) AND
g.brand_id IN (2460,2610,2615) 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)
WHERE g.cat_id IN (3297,437,447,446) AND
g.brand_id IN (2460,2610,2615) 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)
WHERE dc.dop_cat_id IN (3297,437,447,446) AND
g.brand_id IN (2460,2610,2615) AND
go.is_present AND go.is_active AND g.is_present_all_mods AND g.is_active
) A [0.0014309883117676 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_pairs_ot4h35195miouscn4fns4173qs_6a2aa33c454cb;
CREATE TEMPORARY TABLE tmp_pairs_ot4h35195miouscn4fns4173qs_6a2aa33c454cb (
goods_id INT NOT NULL,
filter_id INT NOT NULL,
PRIMARY KEY (goods_id, filter_id)
) ENGINE=MEMORY; [0.00022482872009277 sec]
INSERT INTO tmp_pairs_ot4h35195miouscn4fns4173qs_6a2aa33c454cb (goods_id, filter_id)
SELECT DISTINCT
A.id AS goods_id,
f.id AS filter_id
FROM tmp_A_ot4h35195miouscn4fns4173qs_6a2aa33c454cb 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.001446008682251 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_ot4h35195miouscn4fns4173qs_6a2aa33c454cb;
CREATE TEMPORARY TABLE tmp_counts_ot4h35195miouscn4fns4173qs_6a2aa33c454cb (
filter_id INT NOT NULL PRIMARY KEY,
count INT NOT NULL
) ENGINE=MEMORY; [0.0001988410949707 sec]
INSERT INTO tmp_counts_ot4h35195miouscn4fns4173qs_6a2aa33c454cb (filter_id, count)
SELECT
p.filter_id,
COUNT(*) AS count
FROM tmp_pairs_ot4h35195miouscn4fns4173qs_6a2aa33c454cb p
GROUP BY p.filter_id [0.00020790100097656 sec]
INSERT IGNORE INTO tmp_counts_ot4h35195miouscn4fns4173qs_6a2aa33c454cb (filter_id, count)
SELECT pf.id, 0
FROM pod_filter pf
LEFT JOIN tmp_counts_ot4h35195miouscn4fns4173qs_6a2aa33c454cb c ON c.filter_id = pf.id
WHERE pf.id in (463) AND c.filter_id IS NULL [0.00014090538024902 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_ot4h35195miouscn4fns4173qs_6a2aa33c454cb 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.00019502639770508 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_ot4h35195miouscn4fns4173qs_6a2aa33c454cb [0.00015902519226074 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_pairs_ot4h35195miouscn4fns4173qs_6a2aa33c454cb [8.6069107055664E-5 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_ot4h35195miouscn4fns4173qs_6a2aa33c454cb [6.7949295043945E-5 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_ot4h35195miouscn4fns4173qs_6a2aa33c4697b;
CREATE TEMPORARY TABLE tmp_A_ot4h35195miouscn4fns4173qs_6a2aa33c4697b (
entry INT NOT NULL,
sub_icon_id INT NOT NULL,
PRIMARY KEY (entry, sub_icon_id)
) ENGINE=MEMORY; [0.00020289421081543 sec]
INSERT IGNORE INTO tmp_A_ot4h35195miouscn4fns4173qs_6a2aa33c4697b (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)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (463)
WHERE g.cat_id IN (3297,437,447,446) AND
g.brand_id IN (2460,2610,2615) 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)
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 (3297,437,447,446) AND
g.brand_id IN (2460,2610,2615) 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)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (463)
WHERE g.cat_id IN (3297,437,447,446) AND
g.brand_id IN (2460,2610,2615) 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)
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 (3297,437,447,446) AND
g.brand_id IN (2460,2610,2615) AND
go.is_present AND go.is_active AND g.is_present_all_mods AND g.is_active
) A [0.0022308826446533 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_ot4h35195miouscn4fns4173qs_6a2aa33c4697b;
CREATE TEMPORARY TABLE tmp_counts_ot4h35195miouscn4fns4173qs_6a2aa33c4697b (
sub_icon_id INT NOT NULL PRIMARY KEY,
count INT NOT NULL
) ENGINE=MEMORY; [0.00023794174194336 sec]
INSERT IGNORE INTO tmp_counts_ot4h35195miouscn4fns4173qs_6a2aa33c4697b (sub_icon_id, count)
SELECT
sub_icon_id,
COUNT(DISTINCT entry) AS count
FROM (
SELECT A.entry, A.sub_icon_id
FROM tmp_A_ot4h35195miouscn4fns4173qs_6a2aa33c4697b 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.0003199577331543 sec]
SELECT
c.sub_icon_id AS id,
c.count,
si.entry,
si.name_ua AS name,
si.url
FROM tmp_counts_ot4h35195miouscn4fns4173qs_6a2aa33c4697b 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.00016903877258301 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_ot4h35195miouscn4fns4173qs_6a2aa33c4697b [0.0002140998840332 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_ot4h35195miouscn4fns4173qs_6a2aa33c4697b [8.392333984375E-5 sec]
DEVELOPMENT🌷ЗНИЖКИ ДО 70%
ПЕРЕЙТИ
Виробник: Picasso (США)
Виробник: Picasso (США)
Виробник: Picasso (США)