Медленные запросы БД

Аватар пользователя impulsboy
Не в сети
Регистрация: 31 мая 2013
Сообщения:

Добрый день, со временем пользования сайта и добавления в него товара, стали появлятся так называемые "медленные запросы", некоторые из них я выложу ниже,
вопрос в том, как оптимизировать БД или Drushop для устранения этих медленных запросов. Их в сутки примерно 32шт.!!
Вот некоторые из них:

1. SELECT name, filename, throttle FROM drushop_system WHERE type = 'module' AND STATUS = 1 ORDER BY weight ASC, filename ASC ----Продолжительность выполнения: 00:01:45, сек

2. SELECT * FROM drushop_nodewords WHERE type = 5 AND id = 196 ----Продолжительность выполнения: 00:00:24, сек

3. SELECT v.*, n.type FROM drushop_vocabulary v LEFT JOIN drushop_vocabulary_node_types n ON v.vid = n.vid WHERE v.vid = 1 ---- Продолжительность выполнения: 00:00:16, сек

4. SELECT nt.type, nt.* FROM drushop_node_type nt ORDER BY nt.type ASC ----- Продолжительность выполнения: 00:00:17, сек

5. SELECT DISTINCT(node.nid) AS nid,
node.type AS node_type,
node.title AS node_title,
node.LANGUAGE AS node_language,
node_data_field_image_cache.field_image_cache_fid AS node_data_field_image_cache_field_image_cache_fid,
node_data_field_image_cache.field_image_cache_list AS node_data_field_image_cache_field_image_cache_list,
node_data_field_image_cache.field_image_cache_data AS node_data_field_image_cache_field_image_cache_data,
node_data_field_image_cache.delta AS node_data_field_image_cache_delta,
node.vid AS node_vid,
votingapi_cache_node_average.value AS votingapi_cache_node_average_value,
uc_products.list_price AS uc_products_list_price,
uc_products.sell_price AS uc_products_sell_price,
node_data_field_stock.field_stock_value AS node_data_field_stock_field_stock_value,
uc_products.model AS uc_products_model,
node.created AS node_created,
node_comment_statistics.comment_count AS node_comment_statistics_comment_count,
uc_products.ordering AS uc_products_ordering
FROM drushop_node node
LEFT JOIN drushop_votingapi_cache votingapi_cache_node_average ON node.nid = votingapi_cache_node_average.content_id AND (votingapi_cache_node_average.content_type = 'node' AND votingapi_cache_node_average.FUNCTION = 'average')
LEFT JOIN drushop_content_field_image_cache node_data_field_image_cache ON node.vid = node_data_field_image_cache.vid
LEFT JOIN drushop_uc_products uc_products ON node.vid = uc_products.vid
LEFT JOIN drushop_content_type_product node_data_field_stock ON node.vid = node_data_field_stock.vid
INNER JOIN drushop_node_comment_statistics node_comment_statistics ON node.nid = node_comment_statistics.nid
WHERE (node.STATUS = 1) AND (node.type IN ('product')) AND (node.LANGUAGE IN ('ru', '')) AND (node.vid IN (
SELECT tn.vid FROM drushop_term_node tn
LEFT JOIN drushop_term_hierarchy th ON th.tid = tn.tid
LEFT JOIN drushop_term_hierarchy th1 ON th.parent = th1.tid
LEFT JOIN drushop_term_hierarchy th2 ON th1.parent = th2.tid
LEFT JOIN drushop_term_hierarchy th3 ON th2.parent = th3.tid
LEFT JOIN drushop_term_hierarchy th4 ON th3.parent = th4.tid
LEFT JOIN drushop_term_hierarchy th5 ON th4.parent = th5.tid
LEFT JOIN drushop_term_hierarchy th6 ON th5.parent = th6.tid
LEFT JOIN drushop_term_hierarchy th7 ON th6.parent = th7.tid
LEFT JOIN drushop_term_hierarchy th8 ON th7.parent = th8.tid
LEFT JOIN drushop_term_hierarchy th9 ON th8.parent = th9.tid
LEFT JOIN drushop_term_hierarchy th10 ON th9.parent = th10.tid
WHERE tn.tid = 128
OR th1.tid = 128
OR th2.tid = 128
OR th3.tid = 128
OR th4.tid = 128
OR th5.tid = 128
OR th6.tid = 128
OR th7.tid = 128
OR th8.tid = 128
OR th9.tid = 128
OR th10.tid = 128
))
GROUP BY nid
LIMIT 0, 12 --------Продолжительность выполнения: 00:00:30, сек

Аватар пользователя brusee
Не в сети
Регистрация: 11 Мар 2012
Сообщения:

а оптимизировать таблицы не пробовали?

Аватар пользователя impulsboy
Не в сети
Регистрация: 31 мая 2013
Сообщения:

в этом и вопрос, как?

Аватар пользователя brusee
Не в сети
Регистрация: 11 Мар 2012
Сообщения:

в phpMyAdmin есть такой функционал. открываете вашу базу, выбираете все таблицы, выбираете действие "оптимизировать таблицу"...

Аватар пользователя impulsboy
Не в сети
Регистрация: 31 мая 2013
Сообщения:

нашел, средствами хостинга.. но это не исключило "медленные запросы"

xukaimin
Аватар пользователя xukaimin
Гость
Аватар пользователя xukaimin

clb1225
kate spade outlet store
canada goose jackets
canada goose outlet
coach outlet
moncler uk
north face outlet
timberland boots
ugg outlet
moncler jackets outlet
michael kors outlet online
north face outlet online
pandora charms uk
kate spade handbags
ralph lauren outlet
doudoune moncler
toms outlet
coach factory outlet
nike outlet store
nmd shoes
cheap ray ban sunglasses
louis vuitton
coach factory outlet
polo outlet
cheap uggs
christian louboutin outlet
hermes handbags
coach factory outlet
ugg boots
michael kors handbags
coach outlet
supreme new york
canada goose outlet
pandora charms sale
hermes handbags
pandora jewelry
michael kors outlet
pandora charms
louis vuitton outlet store
cheap oakley sunglasses
ugg outlet
ralph lauren outlet
adidas outlet
louboutin shoes
pandora outlet
pandora charms sale clearance
coach outlet store
coach outlet store online
ugg boots
uggs
coach outlet online
ugg boots
tory burch outlet
coach bags
canada goose sale
salvatore ferragamo shoes
nike outlet
nike shoes
cheap uggs
moncler jackets
longchamp outlet
cheap ugg boots
longchamp outlet
north face jackets
michael kors outlet
cheap jordans for sale
air max 2017
polo ralph lauren outlet
polo ralph lauren
kate spade
coach factory outlet
adidas yeezy boost
michael kors outlet
moncler outlet
michael kors uk
canada goose jackets
birkenstock sandals
ugg outlet store
uggs clearance
ugg outlet
nfl jerseys wholesale
canada goose outlet
moncler jackets
coach outlet store online clearances
moncler jackets
canada goose outlet
coach outlet online
adidas superstar
canada goose outlet
canada goose
coach outlet
adidas outlet
ugg boots
louis vuitton outlet
ugg boots
ugg outlet
cheap uggs
ugg shoes
michael kors outlet store
christian louboutin
canadian goose
ralph lauren outlet
adidas shoes
cheap jordans
polo outlet
ugg outlet
ray ban sunglasses
kate spade outlet
ugg outlet
ray ban sunglasses
polo ralph lauren outlet online
canada goose outlet
pandora charms
michael kors outlet
coach factory outlet
coach factory outlet online
louis vuitton outlet online
louboutin shoes
canada goose jackets
canada goose jackets uk
ugg sale
nike shoes
ferragamo outlet
ralph lauren outlet
pandora outlet
ugg boots
ralph lauren outlet
canada goose sale
cheap ray ban sunglasses
michael kors handbags
jordan shoes
burberry outlet store
nike air max
polo ralph lauren outlet
nike outlet
michael kors outlet store
oakley sunglasses
cheap ray bans
jordan shoes
moncler outlet
burberry outlet
mulberry handbags
adidas yeezy
ultra boost
fitflops
pandora jewelry outlet
cheap mlb jerseys
michael kors outlet
adidas yeezy
hermes birkin
canada goose uk
oakley sunglasses
coach factory outlet
air jordan shoes
michael kors outlet
canada goose uk
nike shoes
coach factory outlet
pandora charms sale clearance
nike air max
coach factory outlet
kate spade outlet
ralph lauren
coach outlet
ugg shoes
cheap nfl jerseys
nike outlet store
pandora charms
red bottom shoes
coach factory outlet
coach outlet
north face jackets
moncler coats
moncler jackets
coach factory outlet
ugg boots
adidas nmd
adidas shoes
michael kors outlet
longchamp outlet online
ugg boots
ugg outlet
ugg outlet
michael kors outlet clearance
canada goose outlet
moncler
uggs outlet
supreme clothing
michael kors outlet
christian louboutin outlet
pandora
coach outlet
uggs
north face jackets
coach canada
polo ralph lauren outlet online
birkenstocks
canada goose outlet
pandora jewelry
cheap mlb jerseys china
yeezy boost 350
canada goose outlet
red bottoms shoes
ugg australia
ralph lauren uk
louis vuitton outlet online
burberry
hermes bags
canada goose outlet
pandora jewelry
ralph lauren uk
the north face
burberry outlet
jordan retro 11
michael kors outlet
nmd adidas
coach outlet
louis vuitton factory outlet
adidas shoes
cheap jordans
adidas shoes
uggs outlet
canada goose uk
canada goose
tory burch outlet store
louis vuitton outlet
ralph lauren outlet
ralph lauren outlet
red bottoms
canada goose uk
moncler outlet
pandora outlet
canada goose outlet
michael kors canada
adidas yeezy
yeezy boost
north face outlet
michael kors handbags
ugg boots
polo ralph lauren outlet
ugg boots
canada goose outlet
polo ralph lauren outlet online
pandora jewelry
longchamp handbags
coach outlet
ralph lauren outlet
polo ralph lauren outlet
canada goose sale
nike store
burberry sale
adidas superstar
tory burch outlet
coach canada
cheap ray ban sunglasses
yeezy boost
uggs canada
cheap jordans
michael kors outlet
hermes outlet
mulberry outlet
cheap jordans
ray ban sunglasses discount
coach outlet
moncler outlet
coach factory outlet
supreme clothing
michael kors outlet
longchamp handbags
coach outlet store
cheap jordans free shipping
canada goose
coach outlet
burberry outlet canada
canada goose jackets
coach outlet store
coach outlet
adidas yeezy
michael kors factory outlet
ferragamo shoes
cheap mlb jerseys
michael kors outlet
ugg outlet
air jordans
moncler jackets
uggs outlet
ugg ustralia
gucci handbags
kate spade bags
ugg boots canada
ugg boots for women
christian louboutin
coach outlet
nmd adidas
ray ban sunglasses
coach outlet
canada goose jackets
air jordans
air jordan shoes
kate spade
ugg outlet
fred perry polo
michael kors outlet clearance
louis vuitton outlet
harden vol 1
canada goose jackets
canada goose
michael kors outlet
louis vuitton outlet store
moncler outlet
michael kors outlet online
ugg outlet
nike outlet online
ugg outlet online
coach outlet
discount oakley sunglasses
cheap uggs
ugg outlet
canada goose uk
canada goose clothing
moncler
yeezy 350 boost
gucci outlet
christian louboutin outlet
adidas outlet
burberry outlet
north face jackets
canada goose sale
nike shoes for men
coach outlet
mulberry bags
ugg outlet
ralph lauren uk
ugg boots on sale
michael kors outlet
cheap jordans
pandora charms
ugg boots
uggs canada
salvatore ferragamo
coach factorty outlet
coach outlet
michael kors outlet
ugg outlet
coach handbags
ralph lauren sale clearance
pandora charms
jordan retro
canada goose outlet
oakley sunglasses
ugg outlet
valentino shoes outlet
coach factory outlet
louis vuitton outlet
nike outlet
ralph lauren uk
ugg australia
canada goose coats
jordans
kate spade handbag
air max 2018
cat boots
michael kors outlet clearance
uggs
coach outlet store
cheap ray bans
ugg boots
moncler outlet
ralph lauren sale clearance
mbt shoes
mulberry uk
adidas nmd
valentino shoes
coach outlet
coach outlet
oakley sunglasses
coach outlet
coach factory outlet online
north face outlet
canada goose jackets
hermes handbags
ugg outlet
fred perry
canada goose
cheap nfl jerseys
canada goose jackets
ugg outlet
ralph lauren outlet
michael kors outlet clearance
canada goose outlet
coach factory outlet
canada goose outlet
coach outlet store
canada goose outlet
timberland outlet
columbia sportswear
adidas yeezy boost
hermens bags
ralph lauren outlet
yeezy boost
ugg boots on sale
polo ralph lauren outlet online
coach factorty outlet
michael kors canada
pandora jewelry
adidas nmd
canada goose outlet
ugg outlet
michael kors outlet clearance
pandora charms sale
coach outlet
ugg outlet
coach outlet
canada goose outlet
ugg boots
ralph lauren outlet
canada goose
fitflops sale
polo ralph lauren outlet online
clb1225