Женские трусики : серый, 80b, 80d, 75h
Производитель: Мамин Дом (Украина)
Производитель: Мамин Дом (Украина)
SELECT url_to, r404
FROM pod_redirect
WHERE BINARY REPLACE(url_from,'/ru/','/') = '/plavki/gray-80b-80d-75h.html' LIMIT 0,1 [0.00041484832763672 sec]
SELECT pod_filter.id,pod_filter.url FROM pod_filter WHERE BINARY pod_filter.url IN ('gray','80b','80d','75h') order by url [0.0013000965118408 sec]
SELECT pod_sub_icon.id,pod_sub_icon.url FROM pod_sub_icon WHERE BINARY pod_sub_icon.url IN ('gray','80b','80d','75h') order by url [0.00092697143554688 sec]
SELECT id, url FROM pod_filter WHERE url IN ('gray','80b','80d','75h') [0.00051212310791016 sec]
SELECT id, url FROM pod_sub_icon WHERE url IN ('gray','80b','80d','75h') [0.00026798248291016 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 (3370,3356,3358,32) and f.is_active AND mf.is_active
ORDER BY mf.id, f.id [0.00043988227844238 sec]
SELECT g.id -- основні
FROM pod_cat_good g
INNER JOIN pod_good_filter gf0 ON g.id = gf0.id_good AND gf0.filter_id_value in (32)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (3356,3358,3370)
WHERE g.cat_id IN (1207) 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 (32)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (3356,3358,3370)
WHERE dc.dop_cat_id IN (1207) 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 g.id = gf0.id_good AND gf0.filter_id_value in (32)
INNER JOIN pod_good_filter gf1 ON go.id = gf1.id_good AND gf1.filter_id_value in (3356,3358,3370)
WHERE g.cat_id IN (1207) 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 g.id = gf0.id_good AND gf0.filter_id_value in (32)
INNER JOIN pod_good_filter gf1 ON go.id = gf1.id_good AND gf1.filter_id_value in (3356,3358,3370)
WHERE dc.dop_cat_id IN (1207) AND
go.is_present AND go.is_active AND g.is_present_all_mods AND g.is_active
[0.010596990585327 sec]
CREATE TEMPORARY TABLE temp_brand_counts_6a2a7c8dd8d5a (
id INT,
gid INT,
INDEX idx_id (id),
INDEX idx_gid (gid)
) [0.00017404556274414 sec]
INSERT INTO temp_brand_counts_6a2a7c8dd8d5a (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 (32)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (3356,3358,3370)
WHERE g.cat_id IN (1207) 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 (32)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (3356,3358,3370)
WHERE dc.dop_cat_id IN (1207) 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 g.id = gf0.id_good AND gf0.filter_id_value in (32)
INNER JOIN pod_good_filter gf1 ON go.id = gf1.id_good AND gf1.filter_id_value in (3356,3358,3370)
WHERE g.cat_id IN (1207) 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 g.id = gf0.id_good AND gf0.filter_id_value in (32)
INNER JOIN pod_good_filter gf1 ON go.id = gf1.id_good AND gf1.filter_id_value in (3356,3358,3370)
WHERE dc.dop_cat_id IN (1207) AND
go.is_present AND go.is_active AND g.is_present_all_mods AND g.is_active
[0.0015189647674561 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_6a2a7c8dd8d5a
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.00030303001403809 sec]
DROP TEMPORARY TABLE IF EXISTS temp_brand_counts_6a2a7c8dd8d5a [9.8943710327148E-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 (32)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (3356,3358,3370)
WHERE g.cat_id IN (1207) 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 (32)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (3356,3358,3370)
WHERE dc.dop_cat_id IN (1207) 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 g.id = gf0.id_good AND gf0.filter_id_value in (32)
INNER JOIN pod_good_filter gf1 ON go.id = gf1.id_good AND gf1.filter_id_value in (3356,3358,3370)
WHERE g.cat_id IN (1207) 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 g.id = gf0.id_good AND gf0.filter_id_value in (32)
INNER JOIN pod_good_filter gf1 ON go.id = gf1.id_good AND gf1.filter_id_value in (3356,3358,3370)
WHERE dc.dop_cat_id IN (1207) AND
go.is_present AND go.is_active AND g.is_present_all_mods AND g.is_active
) A
[0.0014970302581787 sec]
SELECT id, name AS name, url FROM pod_filter WHERE id in (3370,3356,3358,32) AND is_active='1' [0.00015592575073242 sec]
SELECT cf.id,
cf.info AS info,
cf.title AS title,
cf.metadesc AS metadesc,
cf.seo_text AS seo_text,
cf.tagH1 AS tagH1,
cf.is_active
FROM pod_set_cat_subicon cf
INNER JOIN pod_sub_icon f ON cf.subicon_id = f.id
WHERE cf.cat_id = 1207
AND f.url = 'gray' LIMIT 1 [0.00022482872009277 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_cp6op7unairpo6lh12067309iu_6a2a7c8ddb895;
CREATE TEMPORARY TABLE tmp_A_cp6op7unairpo6lh12067309iu_6a2a7c8ddb895 (
id INT NOT NULL,
PRIMARY KEY (id)
) ENGINE=MEMORY; [0.00019407272338867 sec]
INSERT INTO tmp_A_cp6op7unairpo6lh12067309iu_6a2a7c8ddb895 (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 (32)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (3356,3358,3370)
WHERE g.cat_id IN (1207) 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 (32)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (3356,3358,3370)
WHERE dc.dop_cat_id IN (1207) 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 g.id = gf0.id_good AND gf0.filter_id_value in (32)
INNER JOIN pod_good_filter gf1 ON go.id = gf1.id_good AND gf1.filter_id_value in (3356,3358,3370)
WHERE g.cat_id IN (1207) 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 g.id = gf0.id_good AND gf0.filter_id_value in (32)
INNER JOIN pod_good_filter gf1 ON go.id = gf1.id_good AND gf1.filter_id_value in (3356,3358,3370)
WHERE dc.dop_cat_id IN (1207) AND
go.is_present AND go.is_active AND g.is_present_all_mods AND g.is_active
) A [0.0012779235839844 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_pairs_cp6op7unairpo6lh12067309iu_6a2a7c8ddb895;
CREATE TEMPORARY TABLE tmp_pairs_cp6op7unairpo6lh12067309iu_6a2a7c8ddb895 (
goods_id INT NOT NULL,
filter_id INT NOT NULL,
PRIMARY KEY (goods_id, filter_id)
) ENGINE=MEMORY; [0.0001530647277832 sec]
INSERT INTO tmp_pairs_cp6op7unairpo6lh12067309iu_6a2a7c8ddb895 (goods_id, filter_id)
SELECT DISTINCT
A.id AS goods_id,
f.id AS filter_id
FROM tmp_A_cp6op7unairpo6lh12067309iu_6a2a7c8ddb895 A
INNER JOIN pod_good_filter gf ON A.id = gf.id_good AND gf.filter_id_value NOT IN (32,3356,3358,3370)
INNER JOIN pod_cat_filter cf ON gf.filter_id = cf.filter_id AND cf.category_id = 1207
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.0051460266113281 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_cp6op7unairpo6lh12067309iu_6a2a7c8ddb895;
CREATE TEMPORARY TABLE tmp_counts_cp6op7unairpo6lh12067309iu_6a2a7c8ddb895 (
filter_id INT NOT NULL PRIMARY KEY,
count INT NOT NULL
) ENGINE=MEMORY; [0.00015997886657715 sec]
INSERT IGNORE INTO tmp_counts_cp6op7unairpo6lh12067309iu_6a2a7c8ddb895 (filter_id, count)
SELECT
p.filter_id,
COUNT(*) AS count
FROM tmp_pairs_cp6op7unairpo6lh12067309iu_6a2a7c8ddb895 p
GROUP BY p.filter_id [0.00018811225891113 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_cp6op7unairpo6lh12067309iu_6a2a7c8ddb895 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.00021219253540039 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_cp6op7unairpo6lh12067309iu_6a2a7c8ddb895 [0.00014901161193848 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_pairs_cp6op7unairpo6lh12067309iu_6a2a7c8ddb895 [9.918212890625E-5 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_cp6op7unairpo6lh12067309iu_6a2a7c8ddb895 [6.6041946411133E-5 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_cp6op7unairpo6lh12067309iu_6a2a7c8ddd8b5;
CREATE TEMPORARY TABLE tmp_A_cp6op7unairpo6lh12067309iu_6a2a7c8ddd8b5 (
id INT NOT NULL,
entry INT NOT NULL,
PRIMARY KEY (id),
KEY idx_entry (entry)
) ENGINE=MEMORY; [0.00014591217041016 sec]
INSERT INTO tmp_A_cp6op7unairpo6lh12067309iu_6a2a7c8ddd8b5 (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 (32)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (3356,3358,3370)
WHERE g.cat_id IN (1207) 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 (32)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (3356,3358,3370)
WHERE dc.dop_cat_id IN (1207) 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 (32)
INNER JOIN pod_good_filter gf1 ON go.id = gf1.id_good AND gf1.filter_id_value in (3356,3358,3370)
WHERE g.cat_id IN (1207) 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 (32)
INNER JOIN pod_good_filter gf1 ON go.id = gf1.id_good AND gf1.filter_id_value in (3356,3358,3370)
WHERE dc.dop_cat_id IN (1207) AND
go.is_present AND go.is_active AND g.is_present_all_mods AND g.is_active
) A [0.0012738704681396 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_pairs_cp6op7unairpo6lh12067309iu_6a2a7c8ddd8b5;
CREATE TEMPORARY TABLE tmp_pairs_cp6op7unairpo6lh12067309iu_6a2a7c8ddd8b5 (
goods_id INT NOT NULL,
filter_id INT NOT NULL,
PRIMARY KEY (goods_id, filter_id)
) ENGINE=MEMORY; [0.00017285346984863 sec]
INSERT INTO tmp_pairs_cp6op7unairpo6lh12067309iu_6a2a7c8ddd8b5 (goods_id, filter_id)
SELECT DISTINCT
A.entry AS goods_id,
f.id AS filter_id
FROM tmp_A_cp6op7unairpo6lh12067309iu_6a2a7c8ddd8b5 A
INNER JOIN pod_good_filter gf ON A.id = gf.id_good AND gf.filter_id_value NOT IN (32,3356,3358,3370)
INNER JOIN pod_cat_filter cf ON gf.filter_id = cf.filter_id AND cf.category_id = 1207
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.00072097778320312 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_cp6op7unairpo6lh12067309iu_6a2a7c8ddd8b5;
CREATE TEMPORARY TABLE tmp_counts_cp6op7unairpo6lh12067309iu_6a2a7c8ddd8b5 (
filter_id INT NOT NULL PRIMARY KEY,
count INT NOT NULL
) ENGINE=MEMORY; [0.00016117095947266 sec]
INSERT IGNORE INTO tmp_counts_cp6op7unairpo6lh12067309iu_6a2a7c8ddd8b5 (filter_id, count)
SELECT
p.filter_id,
COUNT(*) AS count
FROM tmp_pairs_cp6op7unairpo6lh12067309iu_6a2a7c8ddd8b5 p
GROUP BY p.filter_id [0.00013494491577148 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_cp6op7unairpo6lh12067309iu_6a2a7c8ddd8b5 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.00015807151794434 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_cp6op7unairpo6lh12067309iu_6a2a7c8ddd8b5 [0.00010013580322266 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_pairs_cp6op7unairpo6lh12067309iu_6a2a7c8ddd8b5 [4.9114227294922E-5 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_cp6op7unairpo6lh12067309iu_6a2a7c8ddd8b5 [4.6014785766602E-5 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_cp6op7unairpo6lh12067309iu_6a2a7c8dde76f;
CREATE TEMPORARY TABLE tmp_A_cp6op7unairpo6lh12067309iu_6a2a7c8dde76f (
id INT NOT NULL,
PRIMARY KEY (id)
) ENGINE=MEMORY; [0.00012898445129395 sec]
INSERT INTO tmp_A_cp6op7unairpo6lh12067309iu_6a2a7c8dde76f (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 (3356,3358,3370)
WHERE g.cat_id IN (1207) 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 (3356,3358,3370)
WHERE dc.dop_cat_id IN (1207) 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 (3356,3358,3370)
WHERE g.cat_id IN (1207) 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 (3356,3358,3370)
WHERE dc.dop_cat_id IN (1207) AND
go.is_present AND go.is_active AND g.is_present_all_mods AND g.is_active
) A [0.0011420249938965 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_pairs_cp6op7unairpo6lh12067309iu_6a2a7c8dde76f;
CREATE TEMPORARY TABLE tmp_pairs_cp6op7unairpo6lh12067309iu_6a2a7c8dde76f (
goods_id INT NOT NULL,
filter_id INT NOT NULL,
PRIMARY KEY (goods_id, filter_id)
) ENGINE=MEMORY; [0.0001370906829834 sec]
INSERT INTO tmp_pairs_cp6op7unairpo6lh12067309iu_6a2a7c8dde76f (goods_id, filter_id)
SELECT DISTINCT
A.id AS goods_id,
f.id AS filter_id
FROM tmp_A_cp6op7unairpo6lh12067309iu_6a2a7c8dde76f A
INNER JOIN pod_good_filter gf ON A.id = gf.id_good AND gf.filter_id = 20
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.0027899742126465 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_cp6op7unairpo6lh12067309iu_6a2a7c8dde76f;
CREATE TEMPORARY TABLE tmp_counts_cp6op7unairpo6lh12067309iu_6a2a7c8dde76f (
filter_id INT NOT NULL PRIMARY KEY,
count INT NOT NULL
) ENGINE=MEMORY; [0.00014209747314453 sec]
INSERT INTO tmp_counts_cp6op7unairpo6lh12067309iu_6a2a7c8dde76f (filter_id, count)
SELECT
p.filter_id,
COUNT(*) AS count
FROM tmp_pairs_cp6op7unairpo6lh12067309iu_6a2a7c8dde76f p
GROUP BY p.filter_id [0.00013613700866699 sec]
INSERT IGNORE INTO tmp_counts_cp6op7unairpo6lh12067309iu_6a2a7c8dde76f (filter_id, count)
SELECT pf.id, 0
FROM pod_filter pf
LEFT JOIN tmp_counts_cp6op7unairpo6lh12067309iu_6a2a7c8dde76f c ON c.filter_id = pf.id
WHERE pf.id in (32) AND c.filter_id IS NULL [0.00010418891906738 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_cp6op7unairpo6lh12067309iu_6a2a7c8dde76f 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.00014495849609375 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_cp6op7unairpo6lh12067309iu_6a2a7c8dde76f [9.918212890625E-5 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_pairs_cp6op7unairpo6lh12067309iu_6a2a7c8dde76f [4.9114227294922E-5 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_cp6op7unairpo6lh12067309iu_6a2a7c8dde76f [4.6968460083008E-5 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_cp6op7unairpo6lh12067309iu_6a2a7c8ddfed2;
CREATE TEMPORARY TABLE tmp_A_cp6op7unairpo6lh12067309iu_6a2a7c8ddfed2 (
entry INT NOT NULL,
sub_icon_id INT NOT NULL,
PRIMARY KEY (entry, sub_icon_id)
) ENGINE=MEMORY; [0.00011920928955078 sec]
INSERT IGNORE INTO tmp_A_cp6op7unairpo6lh12067309iu_6a2a7c8ddfed2 (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 (32)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (3356,3358,3370)
WHERE g.cat_id IN (1207) 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 (32)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (3356,3358,3370)
WHERE dc.dop_cat_id IN (1207) 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 g.id = gf0.id_good AND gf0.filter_id_value in (32)
INNER JOIN pod_good_filter gf1 ON go.id = gf1.id_good AND gf1.filter_id_value in (3356,3358,3370)
WHERE g.cat_id IN (1207) 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 g.id = gf0.id_good AND gf0.filter_id_value in (32)
INNER JOIN pod_good_filter gf1 ON go.id = gf1.id_good AND gf1.filter_id_value in (3356,3358,3370)
WHERE dc.dop_cat_id IN (1207) AND
go.is_present AND go.is_active AND g.is_present_all_mods AND g.is_active
) A [0.0010039806365967 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_cp6op7unairpo6lh12067309iu_6a2a7c8ddfed2;
CREATE TEMPORARY TABLE tmp_counts_cp6op7unairpo6lh12067309iu_6a2a7c8ddfed2 (
sub_icon_id INT NOT NULL PRIMARY KEY,
count INT NOT NULL
) ENGINE=MEMORY; [0.00015807151794434 sec]
INSERT IGNORE INTO tmp_counts_cp6op7unairpo6lh12067309iu_6a2a7c8ddfed2 (sub_icon_id, count)
SELECT
sub_icon_id,
COUNT(DISTINCT entry) AS count
FROM (
SELECT A.entry, A.sub_icon_id
FROM tmp_A_cp6op7unairpo6lh12067309iu_6a2a7c8ddfed2 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.00020718574523926 sec]
SELECT
c.sub_icon_id AS id,
c.count,
si.entry,
si.name AS name,
si.url
FROM tmp_counts_cp6op7unairpo6lh12067309iu_6a2a7c8ddfed2 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.00013995170593262 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_cp6op7unairpo6lh12067309iu_6a2a7c8ddfed2 [0.00010108947753906 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_cp6op7unairpo6lh12067309iu_6a2a7c8ddfed2 [4.8160552978516E-5 sec]
DEVELOPMENT🌷СКИДКИ ДО 70%
ПЕРЕЙТИ
Производитель: Мамин Дом (Украина)
Производитель: Мамин Дом (Украина)