Нагрузка на сервер

 
Посетитель
small user social cms
МедальКубок зрительских симпатий
Сообщений: 202
Знающие люди подскажите как посмотреть нагрузку на сервер, количество запросов в БД????
Посетитель
small user social cms
Медаль
Сообщений: 763
Количество запросов непостоянно и зависит от того что выводится на экран - главная страница, статья, форум, альбом и т.д.
Самое большое количество запросов при выводе главной страницы, т.к. обычно туда "напихивают" максимальное количество модулей. При минимальном количестве модулей вывод главной страницы сопровождается примерно 30 запросами к БД.

p.s. сказанное верно для версии 1.2
Редактировалось: 1 раз (Последний: 23 июня 2009 в 06:55)
Реклама
cms
Sometime CMS Community
Посетитель
no avatar
Медаль
Сообщений: 504
Смотри код странички
В конце после закрывающего тэга </html>
В комментах написано время генерации страницы и кол-во запросов в базу:

<!-- Время генерации страницы: 0.3622 сек. --><!-- Запросы в базу: 1 -->
Sometime CMS Community
Посетитель
no avatar
Медаль
Сообщений: 304
Maximov:

Смотри код странички

а у меня на сайте не отображается кол-во запросов
Посетитель
small user social cms
МедальКубок зрительских симпатий
Сообщений: 202
У меня тоже не отображается
Посетитель
small user social cms
Медаль
Сообщений: 763
А вот что пишет у меня (главная страница)
Код PHP:
  1. Время генерации страницы: 0.6561 сек.
  2. Количество запросов: 148
  3. Время выполнения запросов: 0.5269
  4. Запросы:
  5. Текст запросов Время Отобрано
  6. SET TIME_ZONE='-2:00' 0.000081
  7. SET NAMES cp1251 0.000040
  8. SELECT * FROM cms_banlist WHERE ip = '82.207.115.188' AND status=1 0.000080 0
  9. SELECT * FROM cms_online WHERE lastdate <= DATE_SUB(NOW(), INTERVAL 3 MINUTE) 0.000231 0
  10. SELECT id FROM cms_online WHERE (sess_id = 'a77d51baf9c23b7c45436a9704b47a58' AND ip = '82.207.115.188') 0.000168 1
  11. UPDATE cms_online SET lastdate = NOW(), user_id = '1', viewurl = '/' WHERE (sess_id = 'a77d51baf9c23b7c45436a9704b47a58' AND ip = '82.207.115.188') 0.000300 update - обработано: 1
  12. SELECT id FROM cms_stats WHERE (ip = '82.207.115.188' AND page = '/') 0.000045 1
  13. SELECT allow_group FROM cms_menu WHERE id = 1 LIMIT 1 0.000056 1
  14. SELECT template FROM cms_menu WHERE id = 1 LIMIT 1 0.000043 1
  15. SELECT id FROM cms_user_msg WHERE to_id = 1 AND is_new = 1 0.034406 0
  16. SELECT m.id FROM cms_modules m, cms_modules_bind mb WHERE m.position = 'left' AND m.published = 1 AND m.id = mb.module_id AND (mb.menu_id = 1 OR mb.menu_id = 0) 0.000070 8
  17. SELECT *, m.id as mid FROM cms_modules m, cms_modules_bind mb WHERE m.position = 'left' AND m.published = 1 AND m.id = mb.module_id AND (mb.menu_id = 1 OR mb.menu_id = 0) ORDER BY m.ordering ASC 0.001222 8
  18. SELECT config FROM cms_modules WHERE id = '20' 0.000061 1
  19. SELECT config FROM cms_modules WHERE id = '66' 0.000052 1
  20. SELECT config FROM cms_components WHERE link = 'users' 0.000045 1
  21. SELECT id as getfield FROM cms_blogs WHERE user_id = 1 0.000142 1
  22. SELECT p.imageurl, u.is_deleted as is_deleted FROM cms_user_profiles p, cms_users u WHERE p.user_id = 1 AND p.user_id = u.id LIMIT 1 0.000187 1
  23. SELECT id FROM cms_user_msg WHERE to_id = 1 AND is_new = 1 0.000046 0
  24. SELECT * FROM cms_filters WHERE published = 1 ORDER BY id ASC 0.000058 6
  25. SELECT * FROM cms_filter_rules 0.000055 2
  26. SELECT NSLeft, NSRight, NSLevel FROM cms_menu WHERE id = 1 0.000056 1
  27. SELECT id as getfield FROM cms_menu WHERE parent_id=0 0.000050 1
  28. SELECT * FROM cms_menu WHERE id = 1 AND NSDiffer = '' 0.000070 1
  29. SELECT * FROM cms_menu WHERE NSLeft > 1 AND NSRight < 176 AND NSDiffer = '' ORDER BY NSLeft,ordering 0.000168 87
  30. SELECT * FROM cms_filters WHERE published = 1 ORDER BY id ASC 0.000059 6
  31. SELECT * FROM cms_filter_rules 0.000051 2
  32. SELECT * FROM cms_filters WHERE published = 1 ORDER BY id ASC 0.000055 6
  33. SELECT * FROM cms_filter_rules 0.000052 2
  34. SELECT config FROM cms_modules WHERE id = '23' 0.000048 1
  35. SELECT f.*, a.title album_title FROM cms_photo_files f, cms_photo_albums a WHERE f.album_id = a.id AND f.published = 1 ORDER BY RAND() LIMIT 1 0.001455 1
  36. SELECT config FROM cms_modules WHERE id = '49' 0.000054 1
  37. SELECT DISTINCT o.user_id, u.*, DATE_FORMAT(u.regdate, '%d-%m-%Y (%H:%i)') as fdate, p.gender as gender FROM cms_users u, cms_online o, cms_user_profiles p WHERE o.user_id = u.id AND p.user_id = u.id AND u.is_deleted = 0 AND u.is_locked = 0 ORDER BY u.regdate DESC 0.000508 1
  38. SELECT id FROM cms_online WHERE user_id = 0 0.000109 1
  39. SELECT * FROM cms_filters WHERE published = 1 ORDER BY id ASC 0.000056 6
  40. SELECT * FROM cms_filter_rules 0.000050 2
  41. SELECT id FROM cms_stats WHERE DATE(logdate) = CURDATE() GROUP BY ip 0.050464 19
  42. SELECT id FROM cms_stats WHERE DATE(logdate) = CURDATE() 0.051163 56
  43. SELECT id FROM cms_stats GROUP BY ip 0.108817 4,370
  44. SELECT id FROM cms_stats 0.074541 66,678
  45. SELECT *, m.id as mid FROM cms_modules m, cms_modules_bind mb WHERE m.position = 'top' AND m.published = 1 AND m.id = mb.module_id AND (mb.menu_id = 1 OR mb.menu_id = 0) ORDER BY m.ordering ASC 0.001827 12
  46. SELECT * FROM cms_filters WHERE published = 1 ORDER BY id ASC 0.000063 6
  47. SELECT * FROM cms_filter_rules 0.000057 2
  48. SELECT * FROM cms_aphorizm ORDER BY RAND() LIMIT 1 0.000455 1
  49. SELECT * FROM cms_filters WHERE published = 1 ORDER BY id ASC 0.000061 6
  50. SELECT * FROM cms_filter_rules 0.000058 2
  51. SELECT config FROM cms_modules WHERE id = '97' 0.000056 1
  52. SELECT NSLeft, NSRight FROM cms_category WHERE id=33 ORDER BY id ASC 0.000053 1
  53. SELECT DISTINCT con.*, DATE_FORMAT(con.pubdate, '%d-%m-%Y (%H:%i)') as fdate, u.nickname as author, cat.title as cat FROM cms_content con, cms_category cat, cms_users u WHERE con.published = 1 AND con.showlatest = 1 AND con.user_id = u.id AND (con.category_id = cat.id AND cat.NSLeft >= 32 AND cat.NSRight <= 33) AND ( con.is_end='0' OR (con.is_end='1' AND con.enddate > NOW()) ) ORDER BY con.pubdate DESC LIMIT 3 0.004375 1
  54. SELECT * FROM cms_comments WHERE target = 'article' AND target_id = '339' 0.000080 0
  55. SELECT config FROM cms_modules WHERE id = '19' 0.000059 1
  56. SELECT NSLeft, NSRight FROM cms_category WHERE id=2 ORDER BY id ASC 0.000050 1
  57. SELECT DISTINCT con.*, DATE_FORMAT(con.pubdate, '%d-%m-%Y (%H:%i)') as fdate, u.nickname as author, cat.title as cat FROM cms_content con, cms_category cat, cms_users u WHERE con.published = 1 AND con.showlatest = 1 AND con.user_id = u.id AND (con.category_id = cat.id AND cat.NSLeft >= 51 AND cat.NSRight <= 62) AND ( con.is_end='0' OR (con.is_end='1' AND con.enddate > NOW()) ) ORDER BY con.pubdate DESC LIMIT 8 0.012983 8
  58. SELECT * FROM cms_comments WHERE target = 'article' AND target_id = '342' 0.000578 0
  59. SELECT * FROM cms_comments WHERE target = 'article' AND target_id = '341' 0.000062 0
  60. SELECT * FROM cms_comments WHERE target = 'article' AND target_id = '340' 0.000057 0
  61. SELECT * FROM cms_comments WHERE target = 'article' AND target_id = '338' 0.000057 0
  62. SELECT * FROM cms_comments WHERE target = 'article' AND target_id = '334' 0.000056 0
  63. SELECT * FROM cms_comments WHERE target = 'article' AND target_id = '333' 0.000054 0
  64. SELECT * FROM cms_comments WHERE target = 'article' AND target_id = '332' 0.000056 0
  65. SELECT * FROM cms_comments WHERE target = 'article' AND target_id = '331' 0.000061 1
  66. SELECT config FROM cms_modules WHERE id = '64' 0.000060 1
  67. SELECT p.*, b.title as blog, b.owner as owner, b.id as blog_id, IF(DATE_FORMAT(p.pubdate, '%d-%m-%Y')=DATE_FORMAT(NOW(), '%d-%m-%Y'), DATE_FORMAT(p.pubdate, 'Сегодня в %H:%i'), DATE_FORMAT(p.pubdate, '%d-%m-%Y')) as fpubdate, b.user_id as uid FROM cms_blog_posts p, cms_blogs b WHERE p.blog_id = b.id ORDER BY p.pubdate DESC LIMIT 4 0.000337 1
  68. SELECT * FROM cms_filters WHERE published = 1 ORDER BY id ASC 0.000063 6
  69. SELECT * FROM cms_filter_rules 0.000057 2
  70. SELECT variable, value FROM `sverdlov_first`.smf_settings 0.053127
  71. SELECT m.ID_TOPIC, max(m.ID_MSG)ID_MSG, m.ID_BOARD, m.ID_MEMBER, m.posterTime, m.subject, m.posterName, t.numReplies, t.numViews, count(ID_MSG)numTopics, b.name, m.body FROM smf_messages m, smf_topics t, smf_boards b WHERE t.ID_TOPIC=m.ID_TOPIC and m.ID_BOARD=b.ID_BOARD GROUP by ID_TOPIC ORDER by ID_MSG desc LIMIT 10 0.068360 1
  72. SELECT config FROM cms_modules WHERE id = '102' 0.000237 1
  73. SELECT config FROM cms_modules WHERE id = '71' 0.000065 1
  74. SELECT i.title, i.id, i.city as city, u.id as user_id, u.nickname as nickname, IF(DATE_FORMAT(i.pubdate, '%d-%m-%Y')=DATE_FORMAT(NOW(), '%d-%m-%Y'), DATE_FORMAT(i.pubdate, 'Cегодня'), IF(DATEDIFF(NOW(), i.pubdate)=1, DATE_FORMAT(i.pubdate, 'Вчера'),DATE_FORMAT(i.pubdate, '%d.%m.%Y') )) as pubdate FROM cms_board_items i, cms_users u, cms_board_cats cat WHERE i.user_id = u.id AND i.category_id = cat.id ORDER BY i.pubdate DESC LIMIT 10 0.000338 6
  75. SELECT config FROM cms_modules WHERE id = '73' 0.000060 1
  76. SELECT c.*, IF(DATE_FORMAT(c.pubdate, '%d-%m-%Y')=DATE_FORMAT(NOW(), '%d-%m-%Y'), DATE_FORMAT(c.pubdate, 'Cегодня'), IF(DATEDIFF(NOW(), c.pubdate)=1, DATE_FORMAT(c.pubdate, 'Вчера'),DATE_FORMAT(c.pubdate, '%d/%m/%Y') )) as pubdate FROM cms_clubs c WHERE c.published = 1 ORDER BY c.pubdate DESC LIMIT 2 0.000226 0
  77. SELECT config FROM cms_modules WHERE id = '98' 0.000055 1
  78. SELECT NSLeft, NSRight FROM cms_category WHERE id=22 ORDER BY id ASC 0.000053 1
  79. SELECT DISTINCT con.*, DATE_FORMAT(con.pubdate, '%d-%m-%Y (%H:%i)') as fdate, u.nickname as author, cat.title as cat FROM cms_content con, cms_category cat, cms_users u WHERE con.published = 1 AND con.showlatest = 1 AND con.user_id = u.id AND (con.category_id = cat.id AND cat.NSLeft >= 2 AND cat.NSRight <= 7) AND ( con.is_end='0' OR (con.is_end='1' AND con.enddate > NOW()) ) ORDER BY con.pubdate DESC LIMIT 8 0.006333 8
  80. SELECT * FROM cms_comments WHERE target = 'article' AND target_id = '336' 0.000078 0
  81. SELECT * FROM cms_comments WHERE target = 'article' AND target_id = '335' 0.000056 0
  82. SELECT * FROM cms_comments WHERE target = 'article' AND target_id = '323' 0.000059 0
  83. SELECT * FROM cms_comments WHERE target = 'article' AND target_id = '299' 0.000058 0
  84. SELECT * FROM cms_comments WHERE target = 'article' AND target_id = '298' 0.000057 0
  85. SELECT * FROM cms_comments WHERE target = 'article' AND target_id = '290' 0.000059 0
  86. SELECT * FROM cms_comments WHERE target = 'article' AND target_id = '272' 0.000060 0
  87. SELECT * FROM cms_comments WHERE target = 'article' AND target_id = '271' 0.000054 0
  88. SELECT config FROM cms_modules WHERE id = '100' 0.000058 1
  89. SELECT DISTINCT con.*, DATE_FORMAT(con.pubdate, '%d-%m-%Y (%H:%i)') as fdate, u.nickname as author, cat.title as cat FROM cms_content con, cms_category cat, cms_users u WHERE con.published = 1 AND con.showlatest = 1 AND con.user_id = u.id AND con.category_id = 35 AND ( con.is_end='0' OR (con.is_end='1' AND con.enddate > NOW()) ) ORDER BY con.pubdate DESC LIMIT 5 0.016812 5
  90. SELECT * FROM cms_comments WHERE target = 'article' AND target_id = '315' 0.000377 0
  91. SELECT * FROM cms_comments WHERE target = 'article' AND target_id = '315' 0.000053 0
  92. SELECT * FROM cms_comments WHERE target = 'article' AND target_id = '315' 0.000050 0
  93. SELECT * FROM cms_comments WHERE target = 'article' AND target_id = '315' 0.000049 0
  94. SELECT * FROM cms_comments WHERE target = 'article' AND target_id = '315' 0.000049 0
  95. SELECT config FROM cms_modules WHERE id = '101' 0.000051 1
  96. SELECT NSLeft, NSRight FROM cms_category WHERE id=34 ORDER BY id ASC 0.000047 1
  97. SELECT DISTINCT con.*, DATE_FORMAT(con.pubdate, '%d-%m-%Y (%H:%i)') as fdate, u.nickname as author, cat.title as cat FROM cms_content con, cms_category cat, cms_users u WHERE con.published = 1 AND con.showlatest = 1 AND con.user_id = u.id AND (con.category_id = cat.id AND cat.NSLeft >= 49 AND cat.NSRight <= 50) AND ( con.is_end='0' OR (con.is_end='1' AND con.enddate > NOW()) ) ORDER BY con.pubdate DESC LIMIT 8 0.004407 4
  98. SELECT * FROM cms_comments WHERE target = 'article' AND target_id = '329' 0.000059 0
  99. SELECT * FROM cms_comments WHERE target = 'article' AND target_id = '328' 0.000052 0
  100. SELECT * FROM cms_comments WHERE target = 'article' AND target_id = '300' 0.000051 0
  101. SELECT * FROM cms_comments WHERE target = 'article' AND target_id = '273' 0.000054 0
  102. SELECT *, m.id as mid FROM cms_modules m, cms_modules_bind mb WHERE m.position = 'bottom' AND m.published = 1 AND m.id = mb.module_id AND (mb.menu_id = 1 OR mb.menu_id = 0) ORDER BY m.ordering ASC 0.001111 2
  103. SELECT config FROM cms_modules WHERE id = '61' 0.000058 1
  104. SELECT c.*, IF(DATE_FORMAT(c.pubdate, '%d-%m-%Y')=DATE_FORMAT(NOW(), '%d-%m-%Y'), DATE_FORMAT(c.pubdate, 'Сегодня в %H:%i'), DATE_FORMAT(c.pubdate, '%d-%m-%Y')) as fpubdate, u.id as user_id, u.nickname as author FROM cms_comments c, cms_users u WHERE c.user_id=u.id AND c.published=1 AND (c.target="article" OR c.target="photo" OR c.target="blog" OR c.target="catalog" OR c.target="userphoto") ORDER BY c.pubdate DESC LIMIT 10 0.002203 10
  105. SELECT title FROM cms_content WHERE id = 331 0.000052 1
  106. SELECT title FROM cms_content WHERE id = 318 0.000045 1
  107. SELECT title FROM cms_photo_files WHERE id = 214 0.000043 1
  108. SELECT title FROM cms_photo_files WHERE id = 214 0.000042 1
  109. SELECT title FROM cms_photo_files WHERE id = 150 0.000041 1
  110. SELECT title FROM cms_photo_files WHERE id = 131 0.000041 1
  111. SELECT title FROM cms_content WHERE id = 173 0.000043 1
  112. SELECT title FROM cms_content WHERE id = 191 0.000045 1
  113. SELECT title FROM cms_photo_files WHERE id = 80 0.000044 1
  114. SELECT title FROM cms_photo_files WHERE id = 150 0.000040 1
  115. SELECT config FROM cms_modules WHERE id = '67' 0.000051 1
  116. SELECT *, DATE_FORMAT(pubdate, '%d/%m/%Y') as pubdate FROM cms_faq_quests WHERE published = 1 ORDER BY pubdate DESC LIMIT 2 0.000060 2
  117. SELECT m.id FROM cms_modules m, cms_modules_bind mb WHERE m.position = 'right' AND m.published = 1 AND m.id = mb.module_id AND (mb.menu_id = 1 OR mb.menu_id = 0) 0.000053 12
  118. SELECT *, m.id as mid FROM cms_modules m, cms_modules_bind mb WHERE m.position = 'right' AND m.published = 1 AND m.id = mb.module_id AND (mb.menu_id = 1 OR mb.menu_id = 0) ORDER BY m.ordering ASC 0.001186 12
  119. SELECT config FROM cms_modules WHERE id = '70' 0.000051 1
  120. SELECT * FROM cms_filters WHERE published = 1 ORDER BY id ASC 0.000056 6
  121. SELECT * FROM cms_filter_rules 0.000051 2
  122. SELECT count(user.nickname)usr,count(files.id)fls,sum(files.filesize)sum FROM cms_user_files as files, cms_users as user where files.allow_who='all' and user.id=files.user_id order by pubdate desc 0.000469 1
  123. SELECT files.*,user.nickname FROM cms_user_files as files, cms_users as user where files.allow_who='all' and user.id=files.user_id order by pubdate desc limit 10 0.000302 10
  124. SELECT files.*,user.nickname FROM cms_user_files as files, cms_users as user where files.allow_who='all' and user.id=files.user_id order by hits desc limit 10 0.000216 10
  125. SELECT config FROM cms_modules WHERE id = '44' 0.000053 1
  126. SELECT t.*, COUNT(t.tag) as num FROM cms_tags t WHERE length( t.tag ) >= 5 AND (t.target="content" OR t.target="photo" OR t.target="blogpost" OR t.target="catalog" OR t.target="userphoto") GROUP BY t.tag ORDER BY num DESC Limit 50 0.000075 50
  127. SELECT * FROM cms_filters WHERE published = 1 ORDER BY id ASC 0.000055 6
  128. SELECT * FROM cms_filter_rules 0.000052 2
  129. SELECT config FROM cms_modules WHERE id = '62' 0.000050 1
  130. SELECT f.*, IF(DATE_FORMAT(f.pubdate, '%d-%m-%Y')=DATE_FORMAT(NOW(), '%d-%m-%Y'), DATE_FORMAT(f.pubdate, 'Сегодня, %H:%i'), DATE_FORMAT(f.pubdate, '%d-%m-%Y')) as fpubdate, a.id as album_id, a.title as album FROM cms_photo_files f, cms_photo_albums a WHERE f.published = 1 AND f.album_id = a.id ORDER BY pubdate DESC LIMIT 2 0.000443 2
  131. SELECT * FROM cms_comments WHERE target = 'photo' AND target_id = '223' 0.000054 0
  132. SELECT * FROM cms_comments WHERE target = 'photo' AND target_id = '224' 0.000053 0
  133. SELECT config FROM cms_modules WHERE id = '25' 0.000174 1
  134. SELECT * FROM cms_polls ORDER BY RAND() LIMIT 1 0.011419 1
  135. SELECT * FROM cms_polls_log WHERE (ip = '82.207.115.188' OR user_id = '1') AND poll_id = 5 0.007091 1
  136. SELECT * FROM cms_filters WHERE published = 1 ORDER BY id ASC 0.000093 6
  137. SELECT * FROM cms_filter_rules 0.000057 2
  138. SELECT count(user.nickname) as usr FROM cms_users as user where user.birthdate LIKE '%-06-23' 0.000253 1
  139. SELECT config FROM cms_modules WHERE id = '22' 0.000057 1
  140. SELECT *, DATE_FORMAT(regdate, '%d-%m-%Y (%H:%i)') as fdate FROM cms_users WHERE is_deleted = 0 ORDER BY regdate DESC LIMIT 5 0.000364 5
  141. SELECT p.imageurl, u.is_deleted as is_deleted FROM cms_user_profiles p, cms_users u WHERE p.user_id = 119 AND p.user_id = u.id LIMIT 1 0.000252 1
  142. SELECT p.imageurl, u.is_deleted as is_deleted FROM cms_user_profiles p, cms_users u WHERE p.user_id = 118 AND p.user_id = u.id LIMIT 1 0.000218 1
  143. SELECT p.imageurl, u.is_deleted as is_deleted FROM cms_user_profiles p, cms_users u WHERE p.user_id = 117 AND p.user_id = u.id LIMIT 1 0.000220 1
  144. SELECT p.imageurl, u.is_deleted as is_deleted FROM cms_user_profiles p, cms_users u WHERE p.user_id = 116 AND p.user_id = u.id LIMIT 1 0.000271 1
  145. SELECT p.imageurl, u.is_deleted as is_deleted FROM cms_user_profiles p, cms_users u WHERE p.user_id = 115 AND p.user_id = u.id LIMIT 1 0.000235 1
  146. SELECT * FROM cms_filters WHERE published = 1 ORDER BY id ASC 0.000079 6
  147. SELECT * FROM cms_filter_rules 0.000053 2
  148. SELECT * FROM cms_filters WHERE published = 1 ORDER BY id ASC 0.000055 6
  149. SELECT * FROM cms_filter_rules 0.000293 2
  150. SELECT * FROM cms_filters WHERE published = 1 ORDER BY id ASC 0.000056 6
  151. SELECT * FROM cms_filter_rules 0.000050 2
  152. SELECT config FROM cms_modules WHERE id = '103' 0.000059 1
  153. SELECT i.*, DATE_FORMAT(i.pubdate, '%d/%m/%Y') as fdate, c.view_type as viewtype FROM cms_uc_items i, cms_uc_cats c WHERE i.published = 1 AND i.category_id = c.id AND category_id = 15 ORDER BY i.pubdate DESC LIMIT 6 0.000067 4
P.S. Пояснение - после текста запроса идет время выполнения и количество отобранных записей
Редактировалось: 1 раз (Последний: 23 июня 2009 в 07:25)
Посетитель
small user social cms
Медаль
Сообщений: 763
А вот что, при заходе в профиль:
Код PHP:
  1. Время генерации страницы: 0.5338 сек.
  2. Количество запросов: 285
  3. Время выполнения запросов: 0.3056
  4. Запросы:
  5. Текст запросов Время Отобрано
  6. SET TIME_ZONE='-2:00' 0.000094
  7. SET NAMES cp1251 0.000047
  8. SELECT * FROM cms_banlist WHERE ip = '82.207.115.188' AND status=1 0.000077 0
  9. SELECT * FROM cms_online WHERE lastdate <= DATE_SUB(NOW(), INTERVAL 3 MINUTE) 0.000208 0
  10. SELECT id FROM cms_online WHERE (sess_id = 'a77d51baf9c23b7c45436a9704b47a58' AND ip = '82.207.115.188') 0.000162 1
  11. UPDATE cms_online SET lastdate = NOW(), user_id = '1', viewurl = '/users/0/1/profile.html' WHERE (sess_id = 'a77d51baf9c23b7c45436a9704b47a58' AND ip = '82.207.115.188') 0.000266 update - обработано: 1
  12. SELECT id FROM cms_stats WHERE (ip = '82.207.115.188' AND page = '/users/0/1/profile.html') 0.049295 1
  13. SELECT config FROM cms_components WHERE link = 'users' 0.000105 1
  14. SELECT u.*, p.*, u.id as id, u.is_deleted as is_deleted, IFNULL(p.gender, 0) as gender, g.title as grp, IF(DATE_FORMAT(u.regdate, '%d-%m-%Y')=DATE_FORMAT(NOW(), '%d-%m-%Y'), DATE_FORMAT(u.regdate, 'Сегодня, %H:%i'), DATE_FORMAT(u.regdate, '%d, %M %Y')) as fregdate, IF(DATE_FORMAT(u.birthdate, '%d-%m-%Y')=DATE_FORMAT(NOW(), '%d-%m-%Y'), DATE_FORMAT(u.birthdate, 'Сегодня!'), DATE_FORMAT(u.birthdate, '%d, %M %Y')) as birthdate, IF(DATE_FORMAT(u.logdate, '%d-%m-%Y')=DATE_FORMAT(NOW(), '%d-%m-%Y'), DATE_FORMAT(u.logdate, 'Cегодня в %H:%i'), IF(DATEDIFF(NOW(), u.logdate)=1, DATE_FORMAT(u.logdate, 'Вчера в %H:%i'),DATE_FORMAT(u.logdate, '%d-%m-%Y в %H:%i') )) as flogdate FROM cms_users u, cms_user_profiles p, cms_user_groups g WHERE u.is_locked = 0 AND p.user_id = u.id AND u.id = 1 AND u.group_id = g.id LIMIT 1 0.000580 1
  15. ...
Все запросы уже не стал постить, чтобы не забивать форум.
Посетитель
small user social cms
Медаль
Сообщений: 763
Это при выводе статьи:
Код PHP:
  1. Время генерации страницы: 0.4345 сек.
  2. Количество запросов: 71
  3. Время выполнения запросов: 0.3676
  4. ...
Посетитель
small user social cms
Медаль
Сообщений: 763
Это тоже главная, но поотключал немного модулей и другой шаблон:
Код PHP:
  1. Время генерации страницы: 3.9828 сек.
  2. Количество запросов: 44
  3. Время выполнения запросов: 1.4650
  4. Запросы:...
  5.  
Посетитель
small user social cms
МедальКубок зрительских симпатий
Сообщений: 202
Как заставить отображаться, чтобы посмотреть у себя?
Посетитель
small user social cms
МедальКубок зрительских симпатийАвторитет форума
Сообщений: 1224
Включен, режим отладки и что дальше? НИЧего не показывает
Посетитель
small user social cms
Медаль
Сообщений: 763
Режим отладки в 1.5 показывает сообщения об ошибках и не более.
Для сбора и вывода такой статистики нужно менять файлы движка sad
Это у меня в 1.2. В 1.5 еще не разобрался, как сделать так же.
Sometime CMS Community
Посетитель
no avatar
Медаль
Сообщений: 136
Виктор страшные картинки ты однако показал, я в БД особо не разбираюсь, но у меня торент трекер при генерации главной страницы выдаёт всего 9-12 запросов и время генерации страницы не более 0,3 с., а вот 200+ это кажется конкретный перебор, или я ошибаюсь?
Посетитель
small user social cms
Медаль
Сообщений: 763
Увы, за все в этом мире приходится платить sad
Посетитель
small user social cms
Медаль
Сообщений: 763
А вы наверно за пост №9 - не беспокойтесь, это с бесплатного хостинга я скопировал, чтобы показать что нужно находить баланс между возможностями движка и возможностями сервера. Если заметили, то там всего 44 запроса.
В начало страницы
Предыдущая темаСледующая тема Перейти на форум:
Быстрый ответ
Чтобы писать на форуме, зарегистрируйтесь или авторизуйтесь.