Перейти до вмісту
Пошук в
  • Детальніше...
Шукати результати, які ...
Шукати результати в ...

Причины медленной загрузки сайта по Slow запросам


artsmart

Recommended Posts

Привет всем,

 

поставил сайт на хостинг

но грузится очень долго каждая страница

 

помогите снизить/оптимизировать запросы,

вот лог за прошлый день Сайт1 стоит на OpenCarte


# 13.6s user time, 120ms system time, 32.81M rss, 106.81M vsz
# Current date: Wed Apr 1 22:15:41 2015
# Hostname: kondr.beget.ru
# Files: STDIN
# Overall: 36 total, 7 unique, 0.00 QPS, 0.00x concurrency _______________
# Time range: 2015-03-31 15:37:18 to 18:57:27
# Attribute total min max avg 95% stddev median
# ============ ======= ======= ======= ======= ======= ======= =======
# Exec time 48s 1s 2s 1s 2s 273ms 1s
# Lock time 1s 80us 58ms 28ms 48ms 21ms 31ms
# Rows sent 39 0 16 1.08 5.75 3.04 0
# Rows examine 14.66k 0 6.46k 417.03 621.67 1.44k 4.96
# Rows affecte 0 0 0 0 0 0 0
# Bytes sent 94.67k 60 65.37k 2.63k 2.89k 10.42k 271.23
# Query size 5.28k 61 587 150.31 463.90 154.36 62.76

# Profile
# Rank Query ID Response time Calls R/Call V/M Item
# ==== ================== ============= ===== ====== ===== ===============
# 1 0x90C186BB9D7C2816 25.4030 52.6% 19 1.3370 0.02 SELECT oc_site1url_alias
# 2 0x9474BEF71EF43158 9.9509 20.6% 8 1.2439 0.01 SELECT oc_site1url_alias_blog
# 3 0x29910F5BF9FA73BC 4.4891 9.3% 2 2.2446 0.02 SELECT oc_site1category_path oc_site1product_to_category oc_site1product oc_site1product_description oc_site1product_to_store
# 4 0xCC71A6FFBD9263A6 2.4865 5.1% 2 1.2432 0.01 SELECT oc_site1category oc_site1category_description oc_site1category_to_store
# 5 0xB0E0489C9B0B10CA 2.4162 5.0% 2 1.2081 0.00 SELECT oc_site1tax_rule oc_site1tax_rate oc_site1tax_rate_to_customer_group oc_site1zone_to_geo_zone oc_site1geo_zone
# 6 0x54CAEAE1125C27C3 2.3824 4.9% 2 1.1912 0.00 SELECT oc_?category oc_?category_description oc_?category_to_store
# MISC 0xMISC 1.1887 2.5% 1 1.1887 0.0 <1 ITEMS>

# Query 1: 0.00 QPS, 0.00x concurrency, ID 0x90C186BB9D7C2816 at byte 11497373
# Scores: V/M = 0.02
# Time range: 2015-03-31 15:45:13 to 18:53:05
# Attribute pct total min max avg 95% stddev median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count 52 19
# Exec time 52 25s 1s 2s 1s 2s 181ms 1s
# Lock time 53 537ms 86us 58ms 28ms 48ms 21ms 41ms
# Rows sent 2 1 0 1 0.05 0 0.22 0
# Rows examine 0 95 5 5 5 5 0 5
# Rows affecte 0 0 0 0 0 0 0 0
# Bytes sent 5 5.13k 275 304 276.53 271.23 6.21 271.23
# Query size 22 1.17k 63 64 63.05 62.76 0 62.76
# String:
# Databases login_site1
# Hosts localhost
# Last errno 0
# Users login_site1
# Query_time distribution
# 1us
# 10us
# 100us
# 1ms
# 10ms
# 100ms
# 1s ################################################################
# 10s+
# Tables
# SHOW TABLE STATUS FROM `login_site1` LIKE 'oc_site1url_alias'\G
# SHOW CREATE TABLE `login_site1`.`oc_site1url_alias`\G
# EXPLAIN /*!50100 PARTITIONS*/
SELECT * FROM oc_site1url_alias WHERE `query` = 'category_id=530'\G

# Query 2: 0.00 QPS, 0.00x concurrency, ID 0x9474BEF71EF43158 at byte 28497034
# Scores: V/M = 0.01
# Time range: 2015-03-31 17:42:26 to 18:54:56
# Attribute pct total min max avg 95% stddev median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count 22 8
# Exec time 20 10s 1s 2s 1s 2s 124ms 1s
# Lock time 26 272ms 80us 50ms 34ms 48ms 19ms 48ms
# Rows sent 0 0 0 0 0 0 0 0
# Rows examine 1 288 36 36 36 36 0 36
# Rows affecte 0 0 0 0 0 0 0 0
# Bytes sent 2 2.38k 305 305 305 305 0 305
# Query size 9 534 61 78 66.75 76.28 5.71 62.76
# String:
# Databases login_site1
# Hosts localhost
# Last errno 0
# Users login_site1
# Query_time distribution
# 1us
# 10us
# 100us
# 1ms
# 10ms
# 100ms
# 1s ################################################################
# 10s+
# Tables
# SHOW TABLE STATUS FROM `login_site1` LIKE 'oc_site1url_alias_blog'\G
# SHOW CREATE TABLE `login_site1`.`oc_site1url_alias_blog`\G
# EXPLAIN /*!50100 PARTITIONS*/
SELECT * FROM oc_site1url_alias_blog WHERE `query` = 'path=370_464'\G

# Query 3: 0.00 QPS, 0.00x concurrency, ID 0x29910F5BF9FA73BC at byte 10745250
# Scores: V/M = 0.02
# Time range: 2015-03-31 15:37:18 to 18:57:27
# Attribute pct total min max avg 95% stddev median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count 5 2
# Exec time 9 4s 2s 2s 2s 2s 221ms 2s
# Lock time 0 575us 246us 329us 287us 329us 58us 287us
# Rows sent 5 2 1 1 1 1 0 1
# Rows examine 88 12.91k 6.45k 6.46k 6.45k 6.46k 5.66 6.45k
# Rows affecte 0 0 0 0 0 0 0 0
# Bytes sent 0 120 60 60 60 60 0 60
# Query size 17 956 478 478 478 478 0 478
# String:
# Databases login_site1
# Hosts localhost
# Last errno 0
# Users login_site1
# Query_time distribution
# 1us
# 10us
# 100us
# 1ms
# 10ms
# 100ms
# 1s ################################################################
# 10s+
# Tables
# SHOW TABLE STATUS FROM `login_site1` LIKE 'oc_site1category_path'\G
# SHOW CREATE TABLE `login_site1`.`oc_site1category_path`\G
# SHOW TABLE STATUS FROM `login_site1` LIKE 'oc_site1product_to_category'\G
# SHOW CREATE TABLE `login_site1`.`oc_site1product_to_category`\G
# SHOW TABLE STATUS FROM `login_site1` LIKE 'oc_site1product'\G
# SHOW CREATE TABLE `login_site1`.`oc_site1product`\G
# SHOW TABLE STATUS FROM `login_site1` LIKE 'oc_site1product_description'\G
# SHOW CREATE TABLE `login_site1`.`oc_site1product_description`\G
# SHOW TABLE STATUS FROM `login_site1` LIKE 'oc_site1product_to_store'\G
# SHOW CREATE TABLE `login_site1`.`oc_site1product_to_store`\G
# EXPLAIN /*!50100 PARTITIONS*/
SELECT COUNT(DISTINCT p.product_id) AS total FROM oc_site1category_path cp LEFT JOIN oc_site1product_to_category p2c ON (cp.category_id = p2c.category_id) LEFT JOIN oc_site1product p ON (p2c.product_id = p.product_id) LEFT JOIN oc_site1product_description pd ON (p.product_id = pd.product_id) LEFT JOIN oc_site1product_to_store p2s ON (p.product_id = p2s.product_id) WHERE pd.language_id = '2' AND p.status = '1' AND p.date_available <= NOW() AND p2s.store_id = '0' AND cp.path_id = '364'\G

# Query 4: 0.00 QPS, 0.00x concurrency, ID 0xCC71A6FFBD9263A6 at byte 20201755
# Scores: V/M = 0.01
# Time range: 2015-03-31 16:03:16 to 17:28:06
# Attribute pct total min max avg 95% stddev median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count 5 2
# Exec time 5 2s 1s 1s 1s 1s 117ms 1s
# Lock time 7 79ms 29ms 50ms 40ms 50ms 15ms 40ms
# Rows sent 56 22 6 16 11 16 7.07 11
# Rows examine 8 1.21k 602 632 617 632 21.21 617
# Rows affecte 0 0 0 0 0 0 0 0
# Bytes sent 5 4.82k 1.87k 2.95k 2.41k 2.95k 782.77 2.41k
# Query size 11 624 311 313 312 313 1.41 312
# String:
# Databases login_site1
# Hosts localhost
# Last errno 0
# Users login_site1
# Query_time distribution
# 1us
# 10us
# 100us
# 1ms
# 10ms
# 100ms
# 1s ################################################################
# 10s+
# Tables
# SHOW TABLE STATUS FROM `login_site1` LIKE 'oc_site1category'\G
# SHOW CREATE TABLE `login_site1`.`oc_site1category`\G
# SHOW TABLE STATUS FROM `login_site1` LIKE 'oc_site1category_description'\G
# SHOW CREATE TABLE `login_site1`.`oc_site1category_description`\G
# SHOW TABLE STATUS FROM `login_site1` LIKE 'oc_site1category_to_store'\G
# SHOW CREATE TABLE `login_site1`.`oc_site1category_to_store`\G
# EXPLAIN /*!50100 PARTITIONS*/
SELECT * FROM oc_site1category c LEFT JOIN oc_site1category_description cd ON (c.category_id = cd.category_id) LEFT JOIN oc_site1category_to_store c2s ON (c.category_id = c2s.category_id) WHERE c.parent_id = '0' AND cd.language_id = '2' AND c2s.store_id = '0' AND c.status = '1' ORDER BY c.sort_order, LCASE(cd.name)\G

# Query 5: 0.00 QPS, 0.00x concurrency, ID 0xB0E0489C9B0B10CA at byte 25468964
# Scores: V/M = 0.00
# Time range: 2015-03-31 15:49:53 to 18:34:38
# Attribute pct total min max avg 95% stddev median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count 5 2
# Exec time 5 2s 1s 1s 1s 1s 29ms 1s
# Lock time 6 62ms 29ms 32ms 31ms 32ms 2ms 31ms
# Rows sent 0 0 0 0 0 0 0 0
# Rows examine 0 0 0 0 0 0 0 0
# Rows affecte 0 0 0 0 0 0 0 0
# Bytes sent 0 720 360 360 360 360 0 360
# Query size 21 1.15k 587 587 587 587 0 587
# String:
# Databases login_site1
# Hosts localhost
# Last errno 0
# Users login_site1
# Query_time distribution
# 1us
# 10us
# 100us
# 1ms
# 10ms
# 100ms
# 1s ################################################################
# 10s+
# Tables
# SHOW TABLE STATUS FROM `login_site1` LIKE 'oc_site1tax_rule'\G
# SHOW CREATE TABLE `login_site1`.`oc_site1tax_rule`\G
# SHOW TABLE STATUS FROM `login_site1` LIKE 'oc_site1tax_rate'\G
# SHOW CREATE TABLE `login_site1`.`oc_site1tax_rate`\G
# SHOW TABLE STATUS FROM `login_site1` LIKE 'oc_site1tax_rate_to_customer_group'\G
# SHOW CREATE TABLE `login_site1`.`oc_site1tax_rate_to_customer_group`\G
# SHOW TABLE STATUS FROM `login_site1` LIKE 'oc_site1zone_to_geo_zone'\G
# SHOW CREATE TABLE `login_site1`.`oc_site1zone_to_geo_zone`\G
# SHOW TABLE STATUS FROM `login_site1` LIKE 'oc_site1geo_zone'\G
# SHOW CREATE TABLE `login_site1`.`oc_site1geo_zone`\G
# EXPLAIN /*!50100 PARTITIONS*/
SELECT tr2.tax_rate_id, tr2.name, tr2.rate, tr2.type, tr1.priority FROM oc_site1tax_rule tr1 LEFT JOIN oc_site1tax_rate tr2 ON (tr1.tax_rate_id = tr2.tax_rate_id) INNER JOIN oc_site1tax_rate_to_customer_group tr2cg ON (tr2.tax_rate_id = tr2cg.tax_rate_id) LEFT JOIN oc_site1zone_to_geo_zone z2gz ON (tr2.geo_zone_id = z2gz.geo_zone_id) LEFT JOIN oc_site1geo_zone gz ON (tr2.geo_zone_id = gz.geo_zone_id) WHERE tr1.tax_class_id = '9' AND tr1.based = 'shipping' AND tr2cg.customer_group_id = '1' AND z2gz.country_id = '176' AND (z2gz.zone_id = '0' OR z2gz.zone_id = '2761') ORDER BY tr1.priority ASC\G

# Query 6: 0.00 QPS, 0.00x concurrency, ID 0x54CAEAE1125C27C3 at byte 17482483
# Scores: V/M = 0.00
# Time range: 2015-03-31 17:03:44 to 17:35:00
# Attribute pct total min max avg 95% stddev median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count 5 2
# Exec time 4 2s 1s 1s 1s 1s 57ms 1s
# Lock time 5 51ms 352us 50ms 25ms 50ms 35ms 25ms
# Rows sent 23 9 0 9 4.50 9 6.36 4.50
# Rows examine 1 155 64 91 77.50 91 19.09 77.50
# Rows affecte 0 0 0 0 0 0 0 0
# Bytes sent 70 66.79k 1.43k 65.37k 33.40k 65.37k 45.21k 33.40k
# Query size 11 611 305 306 305.50 306 0.71 305.50
# String:
# Databases login_site2
# Hosts localhost
# Last errno 0
# Users login_site2
# Query_time distribution
# 1us
# 10us
# 100us
# 1ms
# 10ms
# 100ms
# 1s ################################################################
# 10s+
# Tables
# SHOW TABLE STATUS FROM `login_site2` LIKE 'oc_category'\G
# SHOW CREATE TABLE `login_site2`.`oc_category`\G
# SHOW TABLE STATUS FROM `login_site2` LIKE 'oc_category_description'\G
# SHOW CREATE TABLE `login_site2`.`oc_category_description`\G
# SHOW TABLE STATUS FROM `login_site2` LIKE 'oc_category_to_store'\G
# SHOW CREATE TABLE `login_site2`.`oc_category_to_store`\G
# EXPLAIN /*!50100 PARTITIONS*/
SELECT * FROM oc_category c LEFT JOIN oc_category_description cd ON (c.category_id = cd.category_id) LEFT JOIN oc_category_to_store c2s ON (c.category_id = c2s.category_id) WHERE c.parent_id = '81' AND cd.language_id = '1' AND c2s.store_id = '0' AND c.status = '1' ORDER BY c.sort_order, LCASE(cd.name)\G

Надіслати
Поділитися на інших сайтах


Створіть аккаунт або увійдіть для коментування

Ви повинні бути користувачем, щоб залишити коментар

Створити обліковий запис

Зареєструйтеся для отримання облікового запису. Це просто!

Зареєструвати аккаунт

Вхід

Уже зареєстровані? Увійдіть тут.

Вхід зараз
  • Зараз на сторінці   0 користувачів

    • Ні користувачів, які переглядиють цю сторінку

×
×
  • Створити...

Important Information

На нашому сайті використовуються файли cookie і відбувається обробка деяких персональних даних користувачів, щоб поліпшити користувальницький інтерфейс. Щоб дізнатися для чого і які персональні дані ми обробляємо перейдіть за посиланням . Якщо Ви натиснете «Я даю згоду», це означає, що Ви розумієте і приймаєте всі умови, зазначені в цьому Повідомленні про конфіденційність.