SELECT url_to, r404
FROM pod_redirect
WHERE BINARY REPLACE(url_from,'/ru/','/') = '/kastryuli/pan_16-stainless-ringel-guzzini-risoli.html' LIMIT 0,1 [0.00039911270141602 sec]
SELECT pod_filter.id,pod_filter.url FROM pod_filter WHERE BINARY pod_filter.url IN ('pan_16','stainless','ringel','guzzini','risoli') order by url [0.00091290473937988 sec]
SELECT pod_sub_icon.id,pod_sub_icon.url FROM pod_sub_icon WHERE BINARY pod_sub_icon.url IN ('pan_16','stainless','ringel','guzzini','risoli') order by url [0.00075602531433105 sec]
select id,url from pod_cat_brand where BINARY url IN ('pan_16','stainless','ringel','guzzini','risoli') [0.0011749267578125 sec]
SELECT id, url FROM pod_filter WHERE url IN ('pan_16','stainless','ringel','guzzini','risoli') [0.00040483474731445 sec]
SELECT id, url FROM pod_sub_icon WHERE url IN ('pan_16','stainless','ringel','guzzini','risoli') [0.00035810470581055 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 (89)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (110)
WHERE g.cat_id IN (115) AND
g.brand_id IN (2442,2445,1415) 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 (89)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (110)
WHERE dc.dop_cat_id IN (115) AND
g.brand_id IN (2442,2445,1415) 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 (89)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (110)
WHERE g.cat_id IN (115) AND
g.brand_id IN (2442,2445,1415) 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 (89)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (110)
WHERE dc.dop_cat_id IN (115) AND
g.brand_id IN (2442,2445,1415) AND
go.is_present AND go.is_active AND g.is_present_all_mods AND g.is_active
[0.12939190864563 sec]
CREATE TEMPORARY TABLE temp_brand_counts_6a2aa2a6f4003 (
id INT,
gid INT,
INDEX idx_id (id),
INDEX idx_gid (gid)
) [0.00081110000610352 sec]
INSERT INTO temp_brand_counts_6a2aa2a6f4003 (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 (89)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (110)
WHERE g.cat_id IN (115) 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 (89)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (110)
WHERE dc.dop_cat_id IN (115) 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 (89)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (110)
WHERE g.cat_id IN (115) 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 (89)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (110)
WHERE dc.dop_cat_id IN (115) 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 (2442,2445,1415) [0.063167095184326 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_6a2aa2a6f4003
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.00051999092102051 sec]
DROP TEMPORARY TABLE IF EXISTS temp_brand_counts_6a2aa2a6f4003 [0.00017905235290527 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 (89)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (110)
WHERE g.cat_id IN (115) AND
g.brand_id IN (2442,2445,1415) 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 (89)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (110)
WHERE dc.dop_cat_id IN (115) AND
g.brand_id IN (2442,2445,1415) 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 (89)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (110)
WHERE g.cat_id IN (115) AND
g.brand_id IN (2442,2445,1415) 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 (89)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (110)
WHERE dc.dop_cat_id IN (115) AND
g.brand_id IN (2442,2445,1415) AND
go.is_present AND go.is_active AND g.is_present_all_mods AND g.is_active
) A
[0.027482986450195 sec]
SELECT name_ua AS name, url FROM pod_cat_brand WHERE id in (2442,2445,1415) [0.00018787384033203 sec]
SELECT name_ua AS name, url FROM pod_cat_brand WHERE id='2442.2445.1415' [0.00012803077697754 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_7872o4ivb3i1kqu0ktfho38ghf_6a2aa2a71839e;
CREATE TEMPORARY TABLE tmp_A_7872o4ivb3i1kqu0ktfho38ghf_6a2aa2a71839e (
id INT NOT NULL,
PRIMARY KEY (id)
) ENGINE=MEMORY; [0.00020098686218262 sec]
INSERT INTO tmp_A_7872o4ivb3i1kqu0ktfho38ghf_6a2aa2a71839e (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 (89)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (110)
WHERE g.cat_id IN (115) AND
g.brand_id IN (2442,2445,1415) 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 (89)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (110)
WHERE dc.dop_cat_id IN (115) AND
g.brand_id IN (2442,2445,1415) 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 (89)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (110)
WHERE g.cat_id IN (115) AND
g.brand_id IN (2442,2445,1415) 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 (89)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (110)
WHERE dc.dop_cat_id IN (115) AND
g.brand_id IN (2442,2445,1415) AND
go.is_present AND go.is_active AND g.is_present_all_mods AND g.is_active
) A [0.019258975982666 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_pairs_7872o4ivb3i1kqu0ktfho38ghf_6a2aa2a71839e;
CREATE TEMPORARY TABLE tmp_pairs_7872o4ivb3i1kqu0ktfho38ghf_6a2aa2a71839e (
goods_id INT NOT NULL,
filter_id INT NOT NULL,
PRIMARY KEY (goods_id, filter_id)
) ENGINE=MEMORY; [0.00031614303588867 sec]
INSERT INTO tmp_pairs_7872o4ivb3i1kqu0ktfho38ghf_6a2aa2a71839e (goods_id, filter_id)
SELECT DISTINCT
A.id AS goods_id,
f.id AS filter_id
FROM tmp_A_7872o4ivb3i1kqu0ktfho38ghf_6a2aa2a71839e A
INNER JOIN pod_good_filter gf ON A.id = gf.id_good AND gf.filter_id_value NOT IN (89,110)
INNER JOIN pod_cat_filter cf ON gf.filter_id = cf.filter_id AND cf.category_id = 115
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.014309883117676 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_7872o4ivb3i1kqu0ktfho38ghf_6a2aa2a71839e;
CREATE TEMPORARY TABLE tmp_counts_7872o4ivb3i1kqu0ktfho38ghf_6a2aa2a71839e (
filter_id INT NOT NULL PRIMARY KEY,
count INT NOT NULL
) ENGINE=MEMORY; [0.00023698806762695 sec]
INSERT IGNORE INTO tmp_counts_7872o4ivb3i1kqu0ktfho38ghf_6a2aa2a71839e (filter_id, count)
SELECT
p.filter_id,
COUNT(*) AS count
FROM tmp_pairs_7872o4ivb3i1kqu0ktfho38ghf_6a2aa2a71839e p
GROUP BY p.filter_id [0.00027990341186523 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_7872o4ivb3i1kqu0ktfho38ghf_6a2aa2a71839e 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.00026702880859375 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_7872o4ivb3i1kqu0ktfho38ghf_6a2aa2a71839e [0.00019311904907227 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_pairs_7872o4ivb3i1kqu0ktfho38ghf_6a2aa2a71839e [9.5129013061523E-5 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_7872o4ivb3i1kqu0ktfho38ghf_6a2aa2a71839e [6.413459777832E-5 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_7872o4ivb3i1kqu0ktfho38ghf_6a2aa2a7210b8;
CREATE TEMPORARY TABLE tmp_A_7872o4ivb3i1kqu0ktfho38ghf_6a2aa2a7210b8 (
id INT NOT NULL,
entry INT NOT NULL,
PRIMARY KEY (id),
KEY idx_entry (entry)
) ENGINE=MEMORY; [0.00018596649169922 sec]
INSERT INTO tmp_A_7872o4ivb3i1kqu0ktfho38ghf_6a2aa2a7210b8 (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 (89)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (110)
WHERE g.cat_id IN (115) AND
g.brand_id IN (2442,2445,1415) 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 (89)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (110)
WHERE dc.dop_cat_id IN (115) AND
g.brand_id IN (2442,2445,1415) 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 (89)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (110)
WHERE g.cat_id IN (115) AND
g.brand_id IN (2442,2445,1415) 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 (89)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (110)
WHERE dc.dop_cat_id IN (115) AND
g.brand_id IN (2442,2445,1415) AND
go.is_present AND go.is_active AND g.is_present_all_mods AND g.is_active
) A [0.0087370872497559 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_pairs_7872o4ivb3i1kqu0ktfho38ghf_6a2aa2a7210b8;
CREATE TEMPORARY TABLE tmp_pairs_7872o4ivb3i1kqu0ktfho38ghf_6a2aa2a7210b8 (
goods_id INT NOT NULL,
filter_id INT NOT NULL,
PRIMARY KEY (goods_id, filter_id)
) ENGINE=MEMORY; [0.00038695335388184 sec]
INSERT INTO tmp_pairs_7872o4ivb3i1kqu0ktfho38ghf_6a2aa2a7210b8 (goods_id, filter_id)
SELECT DISTINCT
A.entry AS goods_id,
f.id AS filter_id
FROM tmp_A_7872o4ivb3i1kqu0ktfho38ghf_6a2aa2a7210b8 A
INNER JOIN pod_good_filter gf ON A.id = gf.id_good AND gf.filter_id_value NOT IN (89,110)
INNER JOIN pod_cat_filter cf ON gf.filter_id = cf.filter_id AND cf.category_id = 115
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.0013151168823242 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_7872o4ivb3i1kqu0ktfho38ghf_6a2aa2a7210b8;
CREATE TEMPORARY TABLE tmp_counts_7872o4ivb3i1kqu0ktfho38ghf_6a2aa2a7210b8 (
filter_id INT NOT NULL PRIMARY KEY,
count INT NOT NULL
) ENGINE=MEMORY; [0.00017905235290527 sec]
INSERT IGNORE INTO tmp_counts_7872o4ivb3i1kqu0ktfho38ghf_6a2aa2a7210b8 (filter_id, count)
SELECT
p.filter_id,
COUNT(*) AS count
FROM tmp_pairs_7872o4ivb3i1kqu0ktfho38ghf_6a2aa2a7210b8 p
GROUP BY p.filter_id [0.00017309188842773 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_7872o4ivb3i1kqu0ktfho38ghf_6a2aa2a7210b8 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.00024700164794922 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_7872o4ivb3i1kqu0ktfho38ghf_6a2aa2a7210b8 [0.00015997886657715 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_pairs_7872o4ivb3i1kqu0ktfho38ghf_6a2aa2a7210b8 [5.1021575927734E-5 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_7872o4ivb3i1kqu0ktfho38ghf_6a2aa2a7210b8 [4.6968460083008E-5 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_7872o4ivb3i1kqu0ktfho38ghf_6a2aa2a7241ad;
CREATE TEMPORARY TABLE tmp_A_7872o4ivb3i1kqu0ktfho38ghf_6a2aa2a7241ad (
id INT NOT NULL,
entry INT NOT NULL,
PRIMARY KEY (id),
KEY idx_entry (entry)
) ENGINE=MEMORY [0.00014901161193848 sec]
INSERT INTO tmp_A_7872o4ivb3i1kqu0ktfho38ghf_6a2aa2a7241ad (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 (110)
WHERE g.cat_id IN (115) AND
g.brand_id IN (2442,2445,1415) 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 (110)
WHERE dc.dop_cat_id IN (115) AND
g.brand_id IN (2442,2445,1415) 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 (110)
WHERE g.cat_id IN (115) AND
g.brand_id IN (2442,2445,1415) 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 (110)
WHERE dc.dop_cat_id IN (115) AND
g.brand_id IN (2442,2445,1415) AND
go.is_present AND go.is_active AND g.is_present_all_mods AND g.is_active
) A [0.011879920959473 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_pairs_7872o4ivb3i1kqu0ktfho38ghf_6a2aa2a7241ad;
CREATE TEMPORARY TABLE tmp_pairs_7872o4ivb3i1kqu0ktfho38ghf_6a2aa2a7241ad (
goods_id INT NOT NULL,
filter_id INT NOT NULL,
PRIMARY KEY (goods_id, filter_id)
) ENGINE=MEMORY [0.00022697448730469 sec]
INSERT INTO tmp_pairs_7872o4ivb3i1kqu0ktfho38ghf_6a2aa2a7241ad (goods_id, filter_id)
SELECT DISTINCT
A.entry AS goods_id,
f.id AS filter_id
FROM tmp_A_7872o4ivb3i1kqu0ktfho38ghf_6a2aa2a7241ad A
INNER JOIN pod_good_filter gf ON A.id = gf.id_good AND gf.filter_id = 86
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.0068411827087402 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_7872o4ivb3i1kqu0ktfho38ghf_6a2aa2a7241ad;
CREATE TEMPORARY TABLE tmp_counts_7872o4ivb3i1kqu0ktfho38ghf_6a2aa2a7241ad (
filter_id INT NOT NULL PRIMARY KEY,
count INT NOT NULL
) ENGINE=MEMORY [0.00020384788513184 sec]
INSERT INTO tmp_counts_7872o4ivb3i1kqu0ktfho38ghf_6a2aa2a7241ad (filter_id, count)
SELECT
p.filter_id,
COUNT(*) AS count
FROM tmp_pairs_7872o4ivb3i1kqu0ktfho38ghf_6a2aa2a7241ad p
GROUP BY p.filter_id [0.00021100044250488 sec]
INSERT INTO tmp_counts_7872o4ivb3i1kqu0ktfho38ghf_6a2aa2a7241ad (filter_id, count)
SELECT pf.id, 0
FROM pod_filter pf
LEFT JOIN tmp_counts_7872o4ivb3i1kqu0ktfho38ghf_6a2aa2a7241ad c ON c.filter_id = pf.id
WHERE pf.id in (89) AND c.filter_id IS NULL [0.00015902519226074 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_7872o4ivb3i1kqu0ktfho38ghf_6a2aa2a7241ad 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.00021910667419434 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_7872o4ivb3i1kqu0ktfho38ghf_6a2aa2a7241ad [0.00014805793762207 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_pairs_7872o4ivb3i1kqu0ktfho38ghf_6a2aa2a7241ad [7.9154968261719E-5 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_7872o4ivb3i1kqu0ktfho38ghf_6a2aa2a7241ad [6.9856643676758E-5 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_7872o4ivb3i1kqu0ktfho38ghf_6a2aa2a729506;
CREATE TEMPORARY TABLE tmp_A_7872o4ivb3i1kqu0ktfho38ghf_6a2aa2a729506 (
id INT NOT NULL,
PRIMARY KEY (id)
) ENGINE=MEMORY; [0.00016903877258301 sec]
INSERT INTO tmp_A_7872o4ivb3i1kqu0ktfho38ghf_6a2aa2a729506 (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 (89)
WHERE g.cat_id IN (115) AND
g.brand_id IN (2442,2445,1415) 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 (89)
WHERE dc.dop_cat_id IN (115) AND
g.brand_id IN (2442,2445,1415) 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 (89)
WHERE g.cat_id IN (115) AND
g.brand_id IN (2442,2445,1415) 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 (89)
WHERE dc.dop_cat_id IN (115) AND
g.brand_id IN (2442,2445,1415) AND
go.is_present AND go.is_active AND g.is_present_all_mods AND g.is_active
) A [0.003972053527832 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_pairs_7872o4ivb3i1kqu0ktfho38ghf_6a2aa2a729506;
CREATE TEMPORARY TABLE tmp_pairs_7872o4ivb3i1kqu0ktfho38ghf_6a2aa2a729506 (
goods_id INT NOT NULL,
filter_id INT NOT NULL,
PRIMARY KEY (goods_id, filter_id)
) ENGINE=MEMORY; [0.00022292137145996 sec]
INSERT INTO tmp_pairs_7872o4ivb3i1kqu0ktfho38ghf_6a2aa2a729506 (goods_id, filter_id)
SELECT DISTINCT
A.id AS goods_id,
f.id AS filter_id
FROM tmp_A_7872o4ivb3i1kqu0ktfho38ghf_6a2aa2a729506 A
INNER JOIN pod_good_filter gf ON A.id = gf.id_good AND gf.filter_id = 106
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.0043900012969971 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_7872o4ivb3i1kqu0ktfho38ghf_6a2aa2a729506;
CREATE TEMPORARY TABLE tmp_counts_7872o4ivb3i1kqu0ktfho38ghf_6a2aa2a729506 (
filter_id INT NOT NULL PRIMARY KEY,
count INT NOT NULL
) ENGINE=MEMORY; [0.00020790100097656 sec]
INSERT INTO tmp_counts_7872o4ivb3i1kqu0ktfho38ghf_6a2aa2a729506 (filter_id, count)
SELECT
p.filter_id,
COUNT(*) AS count
FROM tmp_pairs_7872o4ivb3i1kqu0ktfho38ghf_6a2aa2a729506 p
GROUP BY p.filter_id [0.00018596649169922 sec]
INSERT IGNORE INTO tmp_counts_7872o4ivb3i1kqu0ktfho38ghf_6a2aa2a729506 (filter_id, count)
SELECT pf.id, 0
FROM pod_filter pf
LEFT JOIN tmp_counts_7872o4ivb3i1kqu0ktfho38ghf_6a2aa2a729506 c ON c.filter_id = pf.id
WHERE pf.id in (110) AND c.filter_id IS NULL [0.0001530647277832 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_7872o4ivb3i1kqu0ktfho38ghf_6a2aa2a729506 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.00018000602722168 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_7872o4ivb3i1kqu0ktfho38ghf_6a2aa2a729506 [0.00013589859008789 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_pairs_7872o4ivb3i1kqu0ktfho38ghf_6a2aa2a729506 [5.8174133300781E-5 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_7872o4ivb3i1kqu0ktfho38ghf_6a2aa2a729506 [6.6041946411133E-5 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_7872o4ivb3i1kqu0ktfho38ghf_6a2aa2a72be9f;
CREATE TEMPORARY TABLE tmp_A_7872o4ivb3i1kqu0ktfho38ghf_6a2aa2a72be9f (
entry INT NOT NULL,
sub_icon_id INT NOT NULL,
PRIMARY KEY (entry, sub_icon_id)
) ENGINE=MEMORY; [0.00014805793762207 sec]
INSERT IGNORE INTO tmp_A_7872o4ivb3i1kqu0ktfho38ghf_6a2aa2a72be9f (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 (89)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (110)
WHERE g.cat_id IN (115) AND
g.brand_id IN (2442,2445,1415) 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 (89)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (110)
WHERE dc.dop_cat_id IN (115) AND
g.brand_id IN (2442,2445,1415) 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 (89)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (110)
WHERE g.cat_id IN (115) AND
g.brand_id IN (2442,2445,1415) 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 (89)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (110)
WHERE dc.dop_cat_id IN (115) AND
g.brand_id IN (2442,2445,1415) AND
go.is_present AND go.is_active AND g.is_present_all_mods AND g.is_active
) A [0.0098030567169189 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_7872o4ivb3i1kqu0ktfho38ghf_6a2aa2a72be9f;
CREATE TEMPORARY TABLE tmp_counts_7872o4ivb3i1kqu0ktfho38ghf_6a2aa2a72be9f (
sub_icon_id INT NOT NULL PRIMARY KEY,
count INT NOT NULL
) ENGINE=MEMORY; [0.00021481513977051 sec]
INSERT IGNORE INTO tmp_counts_7872o4ivb3i1kqu0ktfho38ghf_6a2aa2a72be9f (sub_icon_id, count)
SELECT
sub_icon_id,
COUNT(DISTINCT entry) AS count
FROM (
SELECT A.entry, A.sub_icon_id
FROM tmp_A_7872o4ivb3i1kqu0ktfho38ghf_6a2aa2a72be9f 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.00022792816162109 sec]
SELECT
c.sub_icon_id AS id,
c.count,
si.entry,
si.name_ua AS name,
si.url
FROM tmp_counts_7872o4ivb3i1kqu0ktfho38ghf_6a2aa2a72be9f 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.00014686584472656 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_7872o4ivb3i1kqu0ktfho38ghf_6a2aa2a72be9f [0.0001680850982666 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_7872o4ivb3i1kqu0ktfho38ghf_6a2aa2a72be9f [9.5129013061523E-5 sec]
Низькі ціни на Каструлі Ringel ... Risoli (Рінгeл ... Рісoлі) - великий вибір, фото. Купити Каструлі Ringel ... Risoli (Рінгeл ... Рісoлі) в Києві і Україні
Ваше замовлення оформлено! На e-mail відправлено лист з підтвердженням Найближчим часом з Вами зв'яжеться менеджер Дякємо за замовлення!
Ваш профіль буде видалений назавжди. Його не можна відновити. Продовжити?
Залиште свій номер телефону і наші менеджери Вам зателефонують
Оплату картами Visa і MasterCard забезпечує сервіс онлайн-платежів Portmone.com. Безпека оплати підтверджена міжнародним аудитом PCI DSS. Служба підтримки: тел. +380 (44) 2000902