SELECT url_to, r404
FROM pod_redirect
WHERE BINARY REPLACE(url_from,'/ru/','/') = '/konstruktory_kits/o_4-o_7-electronic-developing-constructor_sets-cobi-xtrem_bots-stem.html' LIMIT 0,1 [0.00021696090698242 sec]
SELECT pod_filter.id,pod_filter.url FROM pod_filter WHERE BINARY pod_filter.url IN ('o_4','o_7','electronic','developing','constructor_sets','cobi','xtrem_bots','stem') order by url [0.00067901611328125 sec]
SELECT pod_sub_icon.id,pod_sub_icon.url FROM pod_sub_icon WHERE BINARY pod_sub_icon.url IN ('o_4','o_7','electronic','developing','constructor_sets','cobi','xtrem_bots','stem') order by url [0.0004880428314209 sec]
select id,url from pod_cat_brand where BINARY url IN ('o_4','o_7','electronic','developing','constructor_sets','cobi','xtrem_bots','stem') [0.0009000301361084 sec]
SELECT id, url FROM pod_filter WHERE url IN ('o_4','o_7','electronic','developing','constructor_sets','cobi','xtrem_bots','stem') [0.00047016143798828 sec]
SELECT id, url FROM pod_sub_icon WHERE url IN ('o_4','o_7','electronic','developing','constructor_sets','cobi','xtrem_bots','stem') [0.00040984153747559 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_base_goods;
CREATE TEMPORARY TABLE tmp_base_goods (
id INT NOT NULL PRIMARY KEY,
brand_id INT,
price DECIMAL(10,2),
old_price DECIMAL(10,2),
ordr INT,
is_present TINYINT(1),
sub_icon_id INT,
fast_delivery TINYINT(1),
is_new TINYINT(1),
is_sale TINYINT(1),
KEY idx_brand (brand_id)
) ENGINE=MEMORY [0.00022602081298828 sec]
INSERT INTO tmp_base_goods
(id, brand_id, price, old_price, ordr, is_present, sub_icon_id, fast_delivery, is_new, is_sale)
SELECT g.id, g.brand_id, g.price, g.old_price, g.ordr, g.is_present,
g.sub_icon_id, g.fast_delivery, g.is_new, g.is_sale
FROM pod_cat_good g
WHERE g.cat_id IN (3297,437,447,446) AND g.entry=0 AND g.is_active AND g.is_present_all_mods
UNION
SELECT g.id, g.brand_id, g.price, g.old_price, g.ordr, g.is_present,
g.sub_icon_id, g.fast_delivery, g.is_new, g.is_sale
FROM pod_cat_good g
INNER JOIN pod_dop_cat_category dc ON dc.good_id = g.id
WHERE dc.dop_cat_id IN (3297,437,447,446) AND g.entry=0 AND g.is_active AND g.is_present_all_mods [0.059256076812744 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_sub_goods;
CREATE TEMPORARY TABLE tmp_sub_goods (
id INT NOT NULL PRIMARY KEY,
entry INT NOT NULL,
price DECIMAL(10,2),
old_price DECIMAL(10,2),
sub_icon_id INT,
is_present TINYINT(1),
fast_delivery TINYINT(1),
is_new TINYINT(1),
is_sale TINYINT(1),
KEY idx_entry (entry)
) ENGINE=MEMORY [0.00055098533630371 sec]
INSERT INTO tmp_sub_goods
(id, entry, price, old_price, sub_icon_id, is_present, fast_delivery, is_new, is_sale)
SELECT go.id, go.entry, go.price, go.old_price, go.sub_icon_id, go.is_present,
go.fast_delivery, go.is_new, go.is_sale
FROM pod_cat_good go
INNER JOIN tmp_base_goods t ON go.entry = t.id
WHERE go.is_active AND go.is_present [0.001349925994873 sec]
SELECT g.id /* cats:3297,437,447,446 */
FROM tmp_base_goods g
INNER JOIN pod_good_filter gf0 ON g.id = gf0.id_good AND gf0.filter_id_value in (362,365)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (462,463,466)
WHERE g.brand_id IN (2460,911,2615) AND
g.is_present AND
1
UNION
SELECT g.id /* cats:3297,437,447,446 */
FROM tmp_sub_goods go
INNER JOIN tmp_base_goods g ON go.entry = g.id
INNER JOIN pod_good_filter gf0 ON go.id = gf0.id_good AND gf0.filter_id_value in (362,365)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (462,463,466)
WHERE g.brand_id IN (2460,911,2615) AND
1
[0.011324882507324 sec]
CREATE TEMPORARY TABLE temp_brand_counts_6a2b39648953c (
id INT,
gid INT,
INDEX idx_id (id),
INDEX idx_gid (gid)
) [0.00061988830566406 sec]
INSERT INTO temp_brand_counts_6a2b39648953c (id, gid)
SELECT g.brand_id AS id, g.id AS gid /* cats:3297,437,447,446 */
FROM tmp_base_goods g
INNER JOIN pod_good_filter gf0 ON g.id = gf0.id_good AND gf0.filter_id_value in (362,365)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (462,463,466)
WHERE g.is_present AND
1
UNION
SELECT g.brand_id AS id, g.id AS gid /* cats:3297,437,447,446 */
FROM tmp_sub_goods go
INNER JOIN tmp_base_goods g ON go.entry = g.id
INNER JOIN pod_good_filter gf0 ON go.id = gf0.id_good AND gf0.filter_id_value in (362,365)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (462,463,466)
WHERE 1
UNION
SELECT id, null gid
FROM pod_cat_category
WHERE id in (2460,911,2615) [0.0059380531311035 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_6a2b39648953c
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.00079107284545898 sec]
DROP TEMPORARY TABLE IF EXISTS temp_brand_counts_6a2b39648953c [0.00017690658569336 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 /* cats:3297,437,447,446 */
FROM tmp_base_goods g
INNER JOIN pod_good_filter gf0 ON g.id = gf0.id_good AND gf0.filter_id_value in (362,365)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (462,463,466)
WHERE g.brand_id IN (2460,911,2615) AND
g.is_present AND
1
UNION
SELECT MIN(go.price) AS min_price, MAX(go.price) AS max_price /* cats:3297,437,447,446 */
FROM tmp_sub_goods go
INNER JOIN tmp_base_goods g ON go.entry = g.id
INNER JOIN pod_good_filter gf0 ON go.id = gf0.id_good AND gf0.filter_id_value in (362,365)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (462,463,466)
WHERE g.brand_id IN (2460,911,2615) AND
1
) A
[0.0010840892791748 sec]
SELECT g.id /* cats:3297,437,447,446 */,if(g.is_present and g.price >= '325' and g.price <= '3595',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 >= '325' and g.price <= '3595',greatest(g.price,ifnull(max(pcg.price),g.price)),ifnull(max(pcg.price),g.price)) max_sort_price
FROM tmp_base_goods g
LEFT JOIN pod_cat_good pcg ON pcg.entry=g.id AND pcg.is_present=1 AND pcg.price >= '325' AND pcg.price <= '3595'
WHERE g.id IN (453049,453045,453044,453042,478601,478599,478598,478596)
GROUP BY g.id
ORDER BY g.ordr desc
LIMIT 0, 32 [0.0028390884399414 sec]
SELECT g.video, g.threedvideo, g.is_xit, g.is_action, g.is_sale,
g.sub_is_action, g.is_new, g.is_pay_for_video, g.id, g.cat_id,
g.name AS name, g.name2 AS name2, g.descr, g.size_table, g.artikul, g.image_small,
g.image_big, g.price, g.old_price, g.is_present,
g.is_present_all_mods, g.sub_icon_id,g.url,g.ordr, g.last_items, g.fast_delivery, g.free_delivery, g.gift,
g.timer, g.action_validity,
b.name AS brand_name,b.url as burl,b.id as bid, b.country AS brand_country,c.url as curl, c.name AS cat_name,
si.name AS sub_icon_name,si.icon AS sub_icon,
g.star, g.comment_id, if(g.is_present and g.price >= '325' and g.price <= '3595',least(g.price,ifnull(min(pcg.price),g.price)),ifnull(min(pcg.price),g.price)) as min_sort_price,
if(g.is_present and g.price >= '325' and g.price <= '3595',greatest(g.price,ifnull(max(pcg.price),g.price)),ifnull(max(pcg.price),g.price)) as max_sort_price
FROM pod_cat_good g
INNER JOIN pod_cat_category c ON c.id=g.cat_id
LEFT JOIN pod_cat_brand b ON b.id=g.brand_id
LEFT JOIN pod_sub_icon si ON si.id=g.sub_icon_id
LEFT JOIN pod_cat_good pcg ON (pcg.entry=g.id and pcg.is_present=1 and pcg.price >= '325' and pcg.price <= '3595')
WHERE g.id in (453049,478601,453042,478596,453044,478598,453045,478599)
GROUP BY g.id
ORDER BY g.ordr desc [0.0024778842926025 sec]
SELECT g.ordr, g.is_xit, g.is_pay_for_video, g.is_action, g.is_sale, g.is_new, g.last_items, g.fast_delivery, g.free_delivery, g.gift,
g.timer, g.action_validity,
g.id, g.entry, g.name AS name, g.price, g.old_price, g.artikul, g.sub_icon_id, g.is_present, si.name AS sub_icon_name, si.icon AS sub_icon
FROM pod_cat_good g
LEFT JOIN pod_sub_icon si ON si.id = g.sub_icon_id
WHERE g.entry IN (453042,453044,453045,453049,478596,478598,478599,478601) AND g.is_present = '1' AND g.is_active = '1'
ORDER BY g.entry, g.is_present DESC [0.00075101852416992 sec]
SELECT DISTINCT
ggd2.good_id AS source_good_id,
g.id, g.is_present_all_mods,
pc.name AS name,
g.url,
b.url as burl, c.url as curl,
g.is_present,
pc.code AS color_code,
gg.group_type,
gg.param_name,
gg.param_name_ua,
ggd.text_value,
ggd.icon_path
FROM pod_goods_group_goods ggd2
JOIN pod_goods_group_goods ggd ON ggd2.goods_group_id=ggd.goods_group_id
JOIN pod_goods_group gg ON ggd.goods_group_id=gg.id
JOIN pod_cat_good g ON g.id=ggd.good_id
LEFT JOIN pod_cat_brand b ON g.brand_id=b.id
LEFT JOIN pod_cat_category c ON g.cat_id=c.id
LEFT JOIN pod_colors pc ON pc.id=ggd.color_id
WHERE ggd2.good_id IN (453042,453044,453045,453049,478596,478598,478599,478601)
ORDER BY ggd2.good_id, g.is_present_all_mods DESC [0.0012290477752686 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_pr72ettloubii881n2bandppab_6a2b396490b4b;
CREATE TEMPORARY TABLE tmp_A_pr72ettloubii881n2bandppab_6a2b396490b4b (
id INT NOT NULL,
PRIMARY KEY (id)
) ENGINE=MEMORY; [0.00043606758117676 sec]
INSERT INTO tmp_A_pr72ettloubii881n2bandppab_6a2b396490b4b (id) SELECT A.id FROM (
SELECT g.id /* cats:3297,437,447,446 */
FROM tmp_base_goods g
INNER JOIN pod_good_filter gf0 ON g.id = gf0.id_good AND gf0.filter_id_value in (362,365)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (462,463,466)
WHERE g.brand_id IN (2460,911,2615) AND
g.is_present AND
1
UNION
SELECT g.id /* cats:3297,437,447,446 */
FROM tmp_sub_goods go
INNER JOIN tmp_base_goods g ON go.entry = g.id
INNER JOIN pod_good_filter gf0 ON go.id = gf0.id_good AND gf0.filter_id_value in (362,365)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (462,463,466)
WHERE g.brand_id IN (2460,911,2615) AND
1
) A [0.0014269351959229 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_pairs_pr72ettloubii881n2bandppab_6a2b396490b4b;
CREATE TEMPORARY TABLE tmp_pairs_pr72ettloubii881n2bandppab_6a2b396490b4b (
goods_id INT NOT NULL,
filter_id INT NOT NULL,
PRIMARY KEY (goods_id, filter_id)
) ENGINE=MEMORY; [0.00038814544677734 sec]
INSERT INTO tmp_pairs_pr72ettloubii881n2bandppab_6a2b396490b4b (goods_id, filter_id)
SELECT DISTINCT
A.id AS goods_id,
f.id AS filter_id
FROM tmp_A_pr72ettloubii881n2bandppab_6a2b396490b4b A
INNER JOIN pod_good_filter gf ON A.id = gf.id_good AND gf.filter_id_value NOT IN (362,365,462,463,466)
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.011948108673096 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_pr72ettloubii881n2bandppab_6a2b396490b4b;
CREATE TEMPORARY TABLE tmp_counts_pr72ettloubii881n2bandppab_6a2b396490b4b (
filter_id INT NOT NULL PRIMARY KEY,
count INT NOT NULL
) ENGINE=MEMORY; [0.00046610832214355 sec]
INSERT IGNORE INTO tmp_counts_pr72ettloubii881n2bandppab_6a2b396490b4b (filter_id, count)
SELECT
p.filter_id,
COUNT(*) AS count
FROM tmp_pairs_pr72ettloubii881n2bandppab_6a2b396490b4b p
GROUP BY p.filter_id [0.00047993659973145 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_pr72ettloubii881n2bandppab_6a2b396490b4b 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.00043606758117676 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_pr72ettloubii881n2bandppab_6a2b396490b4b [0.00037693977355957 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_pairs_pr72ettloubii881n2bandppab_6a2b396490b4b [0.00017809867858887 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_pr72ettloubii881n2bandppab_6a2b396490b4b [0.00016593933105469 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_pr72ettloubii881n2bandppab_6a2b39649516a;
CREATE TEMPORARY TABLE tmp_A_pr72ettloubii881n2bandppab_6a2b39649516a (
id INT NOT NULL,
entry INT NOT NULL,
PRIMARY KEY (id),
KEY idx_entry (entry)
) ENGINE=MEMORY; [0.00024199485778809 sec]
INSERT INTO tmp_A_pr72ettloubii881n2bandppab_6a2b39649516a (id, entry) SELECT A.id, A.entry FROM (
SELECT g.id as id, g.id as entry /* cats:3297,437,447,446 */
FROM tmp_base_goods g
INNER JOIN pod_good_filter gf0 ON g.id = gf0.id_good AND gf0.filter_id_value in (362,365)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (462,463,466)
WHERE g.brand_id IN (2460,911,2615) AND
g.is_present AND
1
UNION
SELECT go.id as id, g.id as entry /* cats:3297,437,447,446 */
FROM tmp_sub_goods go
INNER JOIN tmp_base_goods g ON go.entry = g.id
INNER JOIN pod_good_filter gf0 ON go.id = gf0.id_good AND gf0.filter_id_value in (362,365)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (462,463,466)
WHERE g.brand_id IN (2460,911,2615) AND
1
) A [0.00086784362792969 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_pairs_pr72ettloubii881n2bandppab_6a2b39649516a;
CREATE TEMPORARY TABLE tmp_pairs_pr72ettloubii881n2bandppab_6a2b39649516a (
goods_id INT NOT NULL,
filter_id INT NOT NULL,
PRIMARY KEY (goods_id, filter_id)
) ENGINE=MEMORY; [0.00023913383483887 sec]
INSERT INTO tmp_pairs_pr72ettloubii881n2bandppab_6a2b39649516a (goods_id, filter_id)
SELECT DISTINCT
A.entry AS goods_id,
f.id AS filter_id
FROM tmp_A_pr72ettloubii881n2bandppab_6a2b39649516a A
INNER JOIN pod_good_filter gf ON A.id = gf.id_good AND gf.filter_id_value NOT IN (362,365,462,463,466)
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.00072193145751953 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_pr72ettloubii881n2bandppab_6a2b39649516a;
CREATE TEMPORARY TABLE tmp_counts_pr72ettloubii881n2bandppab_6a2b39649516a (
filter_id INT NOT NULL PRIMARY KEY,
count INT NOT NULL
) ENGINE=MEMORY; [0.00020599365234375 sec]
INSERT IGNORE INTO tmp_counts_pr72ettloubii881n2bandppab_6a2b39649516a (filter_id, count)
SELECT
p.filter_id,
COUNT(*) AS count
FROM tmp_pairs_pr72ettloubii881n2bandppab_6a2b39649516a p
GROUP BY p.filter_id [0.00021719932556152 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_pr72ettloubii881n2bandppab_6a2b39649516a 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.0002140998840332 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_pr72ettloubii881n2bandppab_6a2b39649516a [0.0001680850982666 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_pairs_pr72ettloubii881n2bandppab_6a2b39649516a [8.5830688476562E-5 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_pr72ettloubii881n2bandppab_6a2b39649516a [7.2956085205078E-5 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_pr72ettloubii881n2bandppab_6a2b396496488;
CREATE TEMPORARY TABLE tmp_A_pr72ettloubii881n2bandppab_6a2b396496488 (
id INT NOT NULL,
entry INT NOT NULL,
PRIMARY KEY (id),
KEY idx_entry (entry)
) ENGINE=MEMORY [0.00020003318786621 sec]
INSERT INTO tmp_A_pr72ettloubii881n2bandppab_6a2b396496488 (id, entry) SELECT A.id, A.entry FROM (
SELECT g.id as id, g.id as entry /* cats:3297,437,447,446 */
FROM tmp_base_goods g
INNER JOIN pod_good_filter gf0 ON g.id = gf0.id_good AND gf0.filter_id_value in (462,463,466)
WHERE g.brand_id IN (2460,911,2615) AND
g.is_present AND
1
UNION
SELECT go.id as id, g.id as entry /* cats:3297,437,447,446 */
FROM tmp_sub_goods go
INNER JOIN tmp_base_goods g ON go.entry = g.id
INNER JOIN pod_good_filter gf0 ON g.id = gf0.id_good AND gf0.filter_id_value in (462,463,466)
WHERE g.brand_id IN (2460,911,2615) AND
1
) A [0.00054502487182617 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_pairs_pr72ettloubii881n2bandppab_6a2b396496488;
CREATE TEMPORARY TABLE tmp_pairs_pr72ettloubii881n2bandppab_6a2b396496488 (
goods_id INT NOT NULL,
filter_id INT NOT NULL,
PRIMARY KEY (goods_id, filter_id)
) ENGINE=MEMORY [0.00017786026000977 sec]
INSERT INTO tmp_pairs_pr72ettloubii881n2bandppab_6a2b396496488 (goods_id, filter_id)
SELECT DISTINCT
A.entry AS goods_id,
f.id AS filter_id
FROM tmp_A_pr72ettloubii881n2bandppab_6a2b396496488 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.00049495697021484 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_pr72ettloubii881n2bandppab_6a2b396496488;
CREATE TEMPORARY TABLE tmp_counts_pr72ettloubii881n2bandppab_6a2b396496488 (
filter_id INT NOT NULL PRIMARY KEY,
count INT NOT NULL
) ENGINE=MEMORY [0.0001380443572998 sec]
INSERT INTO tmp_counts_pr72ettloubii881n2bandppab_6a2b396496488 (filter_id, count)
SELECT
p.filter_id,
COUNT(*) AS count
FROM tmp_pairs_pr72ettloubii881n2bandppab_6a2b396496488 p
GROUP BY p.filter_id [0.00017118453979492 sec]
INSERT INTO tmp_counts_pr72ettloubii881n2bandppab_6a2b396496488 (filter_id, count)
SELECT pf.id, 0
FROM pod_filter pf
LEFT JOIN tmp_counts_pr72ettloubii881n2bandppab_6a2b396496488 c ON c.filter_id = pf.id
WHERE pf.id in (362,365) AND c.filter_id IS NULL [0.00016593933105469 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_pr72ettloubii881n2bandppab_6a2b396496488 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.00016999244689941 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_pr72ettloubii881n2bandppab_6a2b396496488 [0.00011992454528809 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_pairs_pr72ettloubii881n2bandppab_6a2b396496488 [5.5074691772461E-5 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_pr72ettloubii881n2bandppab_6a2b396496488 [5.1975250244141E-5 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_pr72ettloubii881n2bandppab_6a2b3964972dc;
CREATE TEMPORARY TABLE tmp_A_pr72ettloubii881n2bandppab_6a2b3964972dc (
id INT NOT NULL,
PRIMARY KEY (id)
) ENGINE=MEMORY; [0.00013208389282227 sec]
INSERT INTO tmp_A_pr72ettloubii881n2bandppab_6a2b3964972dc (id) SELECT A.id FROM (
SELECT g.id /* cats:3297,437,447,446 */
FROM tmp_base_goods g
INNER JOIN pod_good_filter gf0 ON g.id = gf0.id_good AND gf0.filter_id_value in (362,365)
WHERE g.brand_id IN (2460,911,2615) AND
g.is_present AND
1
UNION
SELECT g.id /* cats:3297,437,447,446 */
FROM tmp_sub_goods go
INNER JOIN tmp_base_goods g ON go.entry = g.id
INNER JOIN pod_good_filter gf0 ON go.id = gf0.id_good AND gf0.filter_id_value in (362,365)
WHERE g.brand_id IN (2460,911,2615) AND
1
) A [0.00047802925109863 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_pairs_pr72ettloubii881n2bandppab_6a2b3964972dc;
CREATE TEMPORARY TABLE tmp_pairs_pr72ettloubii881n2bandppab_6a2b3964972dc (
goods_id INT NOT NULL,
filter_id INT NOT NULL,
PRIMARY KEY (goods_id, filter_id)
) ENGINE=MEMORY; [0.00023794174194336 sec]
INSERT INTO tmp_pairs_pr72ettloubii881n2bandppab_6a2b3964972dc (goods_id, filter_id)
SELECT DISTINCT
A.id AS goods_id,
f.id AS filter_id
FROM tmp_A_pr72ettloubii881n2bandppab_6a2b3964972dc 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.0027410984039307 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_pr72ettloubii881n2bandppab_6a2b3964972dc;
CREATE TEMPORARY TABLE tmp_counts_pr72ettloubii881n2bandppab_6a2b3964972dc (
filter_id INT NOT NULL PRIMARY KEY,
count INT NOT NULL
) ENGINE=MEMORY; [0.00031399726867676 sec]
INSERT INTO tmp_counts_pr72ettloubii881n2bandppab_6a2b3964972dc (filter_id, count)
SELECT
p.filter_id,
COUNT(*) AS count
FROM tmp_pairs_pr72ettloubii881n2bandppab_6a2b3964972dc p
GROUP BY p.filter_id [0.00034904479980469 sec]
INSERT IGNORE INTO tmp_counts_pr72ettloubii881n2bandppab_6a2b3964972dc (filter_id, count)
SELECT pf.id, 0
FROM pod_filter pf
LEFT JOIN tmp_counts_pr72ettloubii881n2bandppab_6a2b3964972dc c ON c.filter_id = pf.id
WHERE pf.id in (462,463,466) AND c.filter_id IS NULL [0.00035309791564941 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_pr72ettloubii881n2bandppab_6a2b3964972dc 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.00036382675170898 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_pr72ettloubii881n2bandppab_6a2b3964972dc [0.00023818016052246 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_pairs_pr72ettloubii881n2bandppab_6a2b3964972dc [9.7990036010742E-5 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_pr72ettloubii881n2bandppab_6a2b3964972dc [0.00011086463928223 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_pr72ettloubii881n2bandppab_6a2b396498ac7;
CREATE TEMPORARY TABLE tmp_A_pr72ettloubii881n2bandppab_6a2b396498ac7 (
entry INT NOT NULL,
sub_icon_id INT NOT NULL,
PRIMARY KEY (entry, sub_icon_id)
) ENGINE=MEMORY; [0.00022482872009277 sec]
INSERT IGNORE INTO tmp_A_pr72ettloubii881n2bandppab_6a2b396498ac7 (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 /* cats:3297,437,447,446 */
FROM tmp_base_goods g
INNER JOIN pod_good_filter gf0 ON g.id = gf0.id_good AND gf0.filter_id_value in (362,365)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (462,463,466)
WHERE g.brand_id IN (2460,911,2615) AND
g.is_present AND
1
UNION
SELECT go.id as id, g.id as entry, go.sub_icon_id /* cats:3297,437,447,446 */
FROM tmp_sub_goods go
INNER JOIN tmp_base_goods g ON go.entry = g.id
INNER JOIN pod_good_filter gf0 ON go.id = gf0.id_good AND gf0.filter_id_value in (362,365)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (462,463,466)
WHERE g.brand_id IN (2460,911,2615) AND
1
) A [0.0013749599456787 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_pr72ettloubii881n2bandppab_6a2b396498ac7;
CREATE TEMPORARY TABLE tmp_counts_pr72ettloubii881n2bandppab_6a2b396498ac7 (
sub_icon_id INT NOT NULL PRIMARY KEY,
count INT NOT NULL
) ENGINE=MEMORY; [0.0003349781036377 sec]
INSERT IGNORE INTO tmp_counts_pr72ettloubii881n2bandppab_6a2b396498ac7 (sub_icon_id, count)
SELECT
sub_icon_id,
COUNT(DISTINCT entry) AS count
FROM (
SELECT A.entry, A.sub_icon_id
FROM tmp_A_pr72ettloubii881n2bandppab_6a2b396498ac7 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.00047707557678223 sec]
SELECT
c.sub_icon_id AS id,
c.count,
si.entry,
si.name AS name,
si.url
FROM tmp_counts_pr72ettloubii881n2bandppab_6a2b396498ac7 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.00020694732666016 sec]
-----------------------------
SELECT COUNT(*) FROM pod_good_filter
WHERE id_good IN (SELECT id FROM tmp_base_goods); [0.0043730735778809 sec]
Array
(
[0] => Array
(
[COUNT(*)] => 627
)
)
SELECT COUNT(DISTINCT filter_id) FROM pod_good_filter
WHERE id_good IN (SELECT id FROM tmp_base_goods); [0.0048019886016846 sec]
Array
(
[0] => Array
(
[COUNT(DISTINCT filter_id)] => 4
)
)
-----------------------------
DROP TEMPORARY TABLE IF EXISTS tmp_A_pr72ettloubii881n2bandppab_6a2b396498ac7 [0.00020909309387207 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_pr72ettloubii881n2bandppab_6a2b396498ac7 [0.00013089179992676 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_base_goods;
DROP TEMPORARY TABLE IF EXISTS tmp_sub_goods [0.00015616416931152 sec]
Низкие цены на Детские конструкторы Cobi ... Stem (Кoбі ... Стeм) – большой выбор, фото. Купить Детские конструкторы Cobi ... Stem (Кoбі ... Стeм) в Киеве и Украине
Ваш заказ оформлен! На e-mail отправлено письмо с подтверждением В ближайшее время с Вами свяжется менеджер Спасибо за заказ!
Ваш профиль будет удален навсегда. Его нельзя восстановить. Продолжить?
Оставьте свой номер телефона и наши менеджеры вам перезвонят
Оплату картами Visa и MasterCard обеспечивает сервис онлайн-платежей Portmone.com. Безопасность оплаты подтверждена международным аудитом PCI DSS. Служба поддержки: тел. +380(44)2000902