SELECT url_to, r404
FROM pod_redirect
WHERE BINARY REPLACE(url_from,'/ru/','/') = '/konstruktor_dlya_devochek/o_7-o_10-developing-bocasa.html' LIMIT 0,1 [0.00033402442932129 sec]
SELECT pod_filter.id,pod_filter.url FROM pod_filter WHERE BINARY pod_filter.url IN ('o_7','o_10','developing','bocasa') order by url [0.00078320503234863 sec]
SELECT pod_sub_icon.id,pod_sub_icon.url FROM pod_sub_icon WHERE BINARY pod_sub_icon.url IN ('o_7','o_10','developing','bocasa') order by url [0.00067996978759766 sec]
select id,url from pod_cat_brand where BINARY url IN ('o_7','o_10','developing','bocasa') [0.0023739337921143 sec]
SELECT id, url FROM pod_filter WHERE url IN ('o_7','o_10','developing','bocasa') [0.00060319900512695 sec]
SELECT id, url FROM pod_sub_icon WHERE url IN ('o_7','o_10','developing','bocasa') [0.00040221214294434 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,371)
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 (100) 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,371)
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 (100) 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,371)
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 (100) 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,371)
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 (100) AND
go.is_present AND go.is_active AND g.is_present_all_mods AND g.is_active
[0.054512977600098 sec]
CREATE TEMPORARY TABLE temp_brand_counts_6a2ac0d94e0d1 (
id INT,
gid INT,
INDEX idx_id (id),
INDEX idx_gid (gid)
) [0.00020694732666016 sec]
INSERT INTO temp_brand_counts_6a2ac0d94e0d1 (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,371)
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.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,371)
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.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,371)
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
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,371)
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
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 (100) [0.036765813827515 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_6a2ac0d94e0d1
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.00063395500183105 sec]
DROP TEMPORARY TABLE IF EXISTS temp_brand_counts_6a2ac0d94e0d1 [0.00024199485778809 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,371)
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 (100) 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,371)
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 (100) 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,371)
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 (100) 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,371)
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 (100) AND
go.is_present AND go.is_active AND g.is_present_all_mods AND g.is_active
) A
[0.002377986907959 sec]
SELECT g.id,if(g.is_present and g.price >= '0' and g.price <= '99999',least(g.price,ifnull(min(pcg.price),g.price)),ifnull(min(pcg.price),g.price)) min_sort_price
, if(g.is_present and g.price >= '0' and g.price <= '99999',greatest(g.price,ifnull(max(pcg.price),g.price)),ifnull(max(pcg.price),g.price)) max_sort_price
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,371)
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 (100) 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,371)
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 (100) 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,371)
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 (100) 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,371)
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 (100) AND
go.is_present AND go.is_active AND g.is_present_all_mods AND g.is_active
) a INNER JOIN pod_cat_good g ON a.id = g.id
LEFT JOIN pod_cat_good pcg ON pcg.entry=g.id and pcg.is_present=1 and pcg.is_present=1 and pcg.price >= '0' and pcg.price <= '99999' GROUP BY g.id
ORDER BY g.ordr desc
LIMIT 0, 32 [0.0036089420318604 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_bqpsb7umgaeqrci5rnpbpchto9_6a2ac0d95b68b;
CREATE TEMPORARY TABLE tmp_A_bqpsb7umgaeqrci5rnpbpchto9_6a2ac0d95b68b (
id INT NOT NULL,
PRIMARY KEY (id)
) ENGINE=MEMORY; [0.00028491020202637 sec]
INSERT INTO tmp_A_bqpsb7umgaeqrci5rnpbpchto9_6a2ac0d95b68b (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,371)
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 (100) 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,371)
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 (100) 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,371)
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 (100) 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,371)
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 (100) AND
go.is_present AND go.is_active AND g.is_present_all_mods AND g.is_active
) A [0.0018711090087891 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_pairs_bqpsb7umgaeqrci5rnpbpchto9_6a2ac0d95b68b;
CREATE TEMPORARY TABLE tmp_pairs_bqpsb7umgaeqrci5rnpbpchto9_6a2ac0d95b68b (
goods_id INT NOT NULL,
filter_id INT NOT NULL,
PRIMARY KEY (goods_id, filter_id)
) ENGINE=MEMORY; [0.0002131462097168 sec]
INSERT INTO tmp_pairs_bqpsb7umgaeqrci5rnpbpchto9_6a2ac0d95b68b (goods_id, filter_id)
SELECT DISTINCT
A.id AS goods_id,
f.id AS filter_id
FROM tmp_A_bqpsb7umgaeqrci5rnpbpchto9_6a2ac0d95b68b A
INNER JOIN pod_good_filter gf ON A.id = gf.id_good AND gf.filter_id_value NOT IN (365,371,463)
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.0089199542999268 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_bqpsb7umgaeqrci5rnpbpchto9_6a2ac0d95b68b;
CREATE TEMPORARY TABLE tmp_counts_bqpsb7umgaeqrci5rnpbpchto9_6a2ac0d95b68b (
filter_id INT NOT NULL PRIMARY KEY,
count INT NOT NULL
) ENGINE=MEMORY; [0.00027298927307129 sec]
INSERT IGNORE INTO tmp_counts_bqpsb7umgaeqrci5rnpbpchto9_6a2ac0d95b68b (filter_id, count)
SELECT
p.filter_id,
COUNT(*) AS count
FROM tmp_pairs_bqpsb7umgaeqrci5rnpbpchto9_6a2ac0d95b68b p
GROUP BY p.filter_id [0.0001981258392334 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_bqpsb7umgaeqrci5rnpbpchto9_6a2ac0d95b68b 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.00015902519226074 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_bqpsb7umgaeqrci5rnpbpchto9_6a2ac0d95b68b [0.00018095970153809 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_pairs_bqpsb7umgaeqrci5rnpbpchto9_6a2ac0d95b68b [0.00014185905456543 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_bqpsb7umgaeqrci5rnpbpchto9_6a2ac0d95b68b [0.0001070499420166 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_bqpsb7umgaeqrci5rnpbpchto9_6a2ac0d95eb11;
CREATE TEMPORARY TABLE tmp_A_bqpsb7umgaeqrci5rnpbpchto9_6a2ac0d95eb11 (
id INT NOT NULL,
entry INT NOT NULL,
PRIMARY KEY (id),
KEY idx_entry (entry)
) ENGINE=MEMORY; [0.00014090538024902 sec]
INSERT INTO tmp_A_bqpsb7umgaeqrci5rnpbpchto9_6a2ac0d95eb11 (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,371)
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 (100) 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,371)
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 (100) 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,371)
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 (100) 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,371)
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 (100) AND
go.is_present AND go.is_active AND g.is_present_all_mods AND g.is_active
) A [0.0021631717681885 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_pairs_bqpsb7umgaeqrci5rnpbpchto9_6a2ac0d95eb11;
CREATE TEMPORARY TABLE tmp_pairs_bqpsb7umgaeqrci5rnpbpchto9_6a2ac0d95eb11 (
goods_id INT NOT NULL,
filter_id INT NOT NULL,
PRIMARY KEY (goods_id, filter_id)
) ENGINE=MEMORY; [0.00017189979553223 sec]
INSERT INTO tmp_pairs_bqpsb7umgaeqrci5rnpbpchto9_6a2ac0d95eb11 (goods_id, filter_id)
SELECT DISTINCT
A.entry AS goods_id,
f.id AS filter_id
FROM tmp_A_bqpsb7umgaeqrci5rnpbpchto9_6a2ac0d95eb11 A
INNER JOIN pod_good_filter gf ON A.id = gf.id_good AND gf.filter_id_value NOT IN (365,371,463)
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.00035214424133301 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_bqpsb7umgaeqrci5rnpbpchto9_6a2ac0d95eb11;
CREATE TEMPORARY TABLE tmp_counts_bqpsb7umgaeqrci5rnpbpchto9_6a2ac0d95eb11 (
filter_id INT NOT NULL PRIMARY KEY,
count INT NOT NULL
) ENGINE=MEMORY; [0.00017714500427246 sec]
INSERT IGNORE INTO tmp_counts_bqpsb7umgaeqrci5rnpbpchto9_6a2ac0d95eb11 (filter_id, count)
SELECT
p.filter_id,
COUNT(*) AS count
FROM tmp_pairs_bqpsb7umgaeqrci5rnpbpchto9_6a2ac0d95eb11 p
GROUP BY p.filter_id [0.00012493133544922 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_bqpsb7umgaeqrci5rnpbpchto9_6a2ac0d95eb11 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.00014996528625488 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_bqpsb7umgaeqrci5rnpbpchto9_6a2ac0d95eb11 [0.00012087821960449 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_pairs_bqpsb7umgaeqrci5rnpbpchto9_6a2ac0d95eb11 [5.6982040405273E-5 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_bqpsb7umgaeqrci5rnpbpchto9_6a2ac0d95eb11 [0.00013208389282227 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_bqpsb7umgaeqrci5rnpbpchto9_6a2ac0d95fda4;
CREATE TEMPORARY TABLE tmp_A_bqpsb7umgaeqrci5rnpbpchto9_6a2ac0d95fda4 (
id INT NOT NULL,
entry INT NOT NULL,
PRIMARY KEY (id),
KEY idx_entry (entry)
) ENGINE=MEMORY [0.00012922286987305 sec]
INSERT INTO tmp_A_bqpsb7umgaeqrci5rnpbpchto9_6a2ac0d95fda4 (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 (447) AND
g.brand_id IN (100) 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 (447) AND
g.brand_id IN (100) 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 (447) AND
g.brand_id IN (100) 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 (447) AND
g.brand_id IN (100) AND
go.is_present AND go.is_active AND g.is_present_all_mods AND g.is_active
) A [0.0015771389007568 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_pairs_bqpsb7umgaeqrci5rnpbpchto9_6a2ac0d95fda4;
CREATE TEMPORARY TABLE tmp_pairs_bqpsb7umgaeqrci5rnpbpchto9_6a2ac0d95fda4 (
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_bqpsb7umgaeqrci5rnpbpchto9_6a2ac0d95fda4 (goods_id, filter_id)
SELECT DISTINCT
A.entry AS goods_id,
f.id AS filter_id
FROM tmp_A_bqpsb7umgaeqrci5rnpbpchto9_6a2ac0d95fda4 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.0020570755004883 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_bqpsb7umgaeqrci5rnpbpchto9_6a2ac0d95fda4;
CREATE TEMPORARY TABLE tmp_counts_bqpsb7umgaeqrci5rnpbpchto9_6a2ac0d95fda4 (
filter_id INT NOT NULL PRIMARY KEY,
count INT NOT NULL
) ENGINE=MEMORY [0.00018787384033203 sec]
INSERT INTO tmp_counts_bqpsb7umgaeqrci5rnpbpchto9_6a2ac0d95fda4 (filter_id, count)
SELECT
p.filter_id,
COUNT(*) AS count
FROM tmp_pairs_bqpsb7umgaeqrci5rnpbpchto9_6a2ac0d95fda4 p
GROUP BY p.filter_id [0.00014901161193848 sec]
INSERT INTO tmp_counts_bqpsb7umgaeqrci5rnpbpchto9_6a2ac0d95fda4 (filter_id, count)
SELECT pf.id, 0
FROM pod_filter pf
LEFT JOIN tmp_counts_bqpsb7umgaeqrci5rnpbpchto9_6a2ac0d95fda4 c ON c.filter_id = pf.id
WHERE pf.id in (365,371) AND c.filter_id IS NULL [0.00015997886657715 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_bqpsb7umgaeqrci5rnpbpchto9_6a2ac0d95fda4 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.00017881393432617 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_bqpsb7umgaeqrci5rnpbpchto9_6a2ac0d95fda4 [0.0001220703125 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_pairs_bqpsb7umgaeqrci5rnpbpchto9_6a2ac0d95fda4 [8.1062316894531E-5 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_bqpsb7umgaeqrci5rnpbpchto9_6a2ac0d95fda4 [6.8902969360352E-5 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_bqpsb7umgaeqrci5rnpbpchto9_6a2ac0d9614b5;
CREATE TEMPORARY TABLE tmp_A_bqpsb7umgaeqrci5rnpbpchto9_6a2ac0d9614b5 (
id INT NOT NULL,
PRIMARY KEY (id)
) ENGINE=MEMORY; [0.00011897087097168 sec]
INSERT INTO tmp_A_bqpsb7umgaeqrci5rnpbpchto9_6a2ac0d9614b5 (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,371)
WHERE g.cat_id IN (447) AND
g.brand_id IN (100) 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,371)
WHERE dc.dop_cat_id IN (447) AND
g.brand_id IN (100) 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,371)
WHERE g.cat_id IN (447) AND
g.brand_id IN (100) 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,371)
WHERE dc.dop_cat_id IN (447) AND
g.brand_id IN (100) AND
go.is_present AND go.is_active AND g.is_present_all_mods AND g.is_active
) A [0.0016279220581055 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_pairs_bqpsb7umgaeqrci5rnpbpchto9_6a2ac0d9614b5;
CREATE TEMPORARY TABLE tmp_pairs_bqpsb7umgaeqrci5rnpbpchto9_6a2ac0d9614b5 (
goods_id INT NOT NULL,
filter_id INT NOT NULL,
PRIMARY KEY (goods_id, filter_id)
) ENGINE=MEMORY; [0.00015807151794434 sec]
INSERT INTO tmp_pairs_bqpsb7umgaeqrci5rnpbpchto9_6a2ac0d9614b5 (goods_id, filter_id)
SELECT DISTINCT
A.id AS goods_id,
f.id AS filter_id
FROM tmp_A_bqpsb7umgaeqrci5rnpbpchto9_6a2ac0d9614b5 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.0019829273223877 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_bqpsb7umgaeqrci5rnpbpchto9_6a2ac0d9614b5;
CREATE TEMPORARY TABLE tmp_counts_bqpsb7umgaeqrci5rnpbpchto9_6a2ac0d9614b5 (
filter_id INT NOT NULL PRIMARY KEY,
count INT NOT NULL
) ENGINE=MEMORY; [0.00020599365234375 sec]
INSERT INTO tmp_counts_bqpsb7umgaeqrci5rnpbpchto9_6a2ac0d9614b5 (filter_id, count)
SELECT
p.filter_id,
COUNT(*) AS count
FROM tmp_pairs_bqpsb7umgaeqrci5rnpbpchto9_6a2ac0d9614b5 p
GROUP BY p.filter_id [0.00015377998352051 sec]
INSERT IGNORE INTO tmp_counts_bqpsb7umgaeqrci5rnpbpchto9_6a2ac0d9614b5 (filter_id, count)
SELECT pf.id, 0
FROM pod_filter pf
LEFT JOIN tmp_counts_bqpsb7umgaeqrci5rnpbpchto9_6a2ac0d9614b5 c ON c.filter_id = pf.id
WHERE pf.id in (463) AND c.filter_id IS NULL [0.0001380443572998 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_bqpsb7umgaeqrci5rnpbpchto9_6a2ac0d9614b5 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.0001521110534668 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_bqpsb7umgaeqrci5rnpbpchto9_6a2ac0d9614b5 [0.00015115737915039 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_pairs_bqpsb7umgaeqrci5rnpbpchto9_6a2ac0d9614b5 [0.00015902519226074 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_bqpsb7umgaeqrci5rnpbpchto9_6a2ac0d9614b5 [0.00011396408081055 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_bqpsb7umgaeqrci5rnpbpchto9_6a2ac0d962d17;
CREATE TEMPORARY TABLE tmp_A_bqpsb7umgaeqrci5rnpbpchto9_6a2ac0d962d17 (
entry INT NOT NULL,
sub_icon_id INT NOT NULL,
PRIMARY KEY (entry, sub_icon_id)
) ENGINE=MEMORY; [0.00023603439331055 sec]
INSERT IGNORE INTO tmp_A_bqpsb7umgaeqrci5rnpbpchto9_6a2ac0d962d17 (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,371)
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 (100) 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,371)
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 (100) 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,371)
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 (100) 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,371)
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 (100) AND
go.is_present AND go.is_active AND g.is_present_all_mods AND g.is_active
) A [0.004241943359375 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_bqpsb7umgaeqrci5rnpbpchto9_6a2ac0d962d17;
CREATE TEMPORARY TABLE tmp_counts_bqpsb7umgaeqrci5rnpbpchto9_6a2ac0d962d17 (
sub_icon_id INT NOT NULL PRIMARY KEY,
count INT NOT NULL
) ENGINE=MEMORY; [0.00043511390686035 sec]
INSERT IGNORE INTO tmp_counts_bqpsb7umgaeqrci5rnpbpchto9_6a2ac0d962d17 (sub_icon_id, count)
SELECT
sub_icon_id,
COUNT(DISTINCT entry) AS count
FROM (
SELECT A.entry, A.sub_icon_id
FROM tmp_A_bqpsb7umgaeqrci5rnpbpchto9_6a2ac0d962d17 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.00044488906860352 sec]
SELECT
c.sub_icon_id AS id,
c.count,
si.entry,
si.name AS name,
si.url
FROM tmp_counts_bqpsb7umgaeqrci5rnpbpchto9_6a2ac0d962d17 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.00016880035400391 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_bqpsb7umgaeqrci5rnpbpchto9_6a2ac0d962d17 [0.00038504600524902 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_bqpsb7umgaeqrci5rnpbpchto9_6a2ac0d962d17 [0.00014805793762207 sec]
Низкие цены на Конструктор для девочек Biederlack (Біeдeрлaк) – большой выбор, фото. Купить Конструктор для девочек Biederlack (Біeдeрлaк) в Киеве и Украине
Ваш заказ оформлен! На e-mail отправлено письмо с подтверждением В ближайшее время с Вами свяжется менеджер Спасибо за заказ!
Ваш профиль будет удален навсегда. Его нельзя восстановить. Продолжить?
Оставьте свой номер телефона и наши менеджеры вам перезвонят
Оплату картами Visa и MasterCard обеспечивает сервис онлайн-платежей Portmone.com. Безопасность оплаты подтверждена международным аудитом PCI DSS. Служба поддержки: тел. +380(44)2000902