Discuz!官方免费开源建站系统

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索

新换的服务器2008R2运行DX3.2之后的效率,有点相死!

[复制链接]
doloer 发表于 2014-8-4 18:50:19 | 显示全部楼层 |阅读模式
各种插件都挨个测试了,最后开启debug 发现是 主题表的问题!但是不知道为什么会这么慢!!


http://bbs.04168.com/forum.php?mod=forumdisplay&fid=51  测试地址,在游客状态下的确很速度,因为有缓存,大约在0.0X 左右!!!


但是在登陆状态下,就不一定了,慢的时候达到 117.X   我设置的是120超时!!

  1. Queries: 18
  2. 0.001000s • DBLink 1 • source/class/discuz/discuz_table.php
  3. SELECT * FROM pre_common_member_newprompt WHERE `uid`='1'

  4. 0.000000s • DBLink 1 • source/class/table/table_common_session.php
  5. SELECT * FROM pre_common_session WHERE `sid`='cRobR9'

  6. 0.001000s • DBLink 1 • source/class/table/table_forum_forum.php
  7. SELECT ff.*, f.* FROM pre_forum_forum f LEFT JOIN pre_forum_forumfield ff ON ff.fid=f.fid WHERE f.fid=51

  8. 0.001001s • DBLink 1 • source/class/discuz/discuz_table.php
  9. SELECT * FROM pre_common_member_wechatmp WHERE `uid`='1'

  10. 0.001000s • DBLink 1 • source/class/table/table_forum_thread.php
  11. SELECT COUNT(*) FROM pre_forum_thread WHERE fid=51 AND displayorder=-2 AND authorid=1

  12. 0.000000s • DBLink 1 • source/class/table/table_forum_forumrecommend.php
  13. SELECT * FROM pre_forum_forumrecommend WHERE fid=51 AND `position` IN('0','1') ORDER BY displayorder

  14. 0.000000s • DBLink 1 • source/class/table/table_forum_thread.php
  15. SELECT COUNT(*) FROM pre_forum_thread t WHERE t.`fid` IN('52','53','54','51') AND t.`displayorder`>='0'

  16. 0.001000s • DBLink 1 • source/class/table/table_forum_thread.php
  17. SELECT * FROM pre_forum_thread WHERE `tid` IN('1243349','1243357','1244179') AND `displayorder` IN('2','3','4') ORDER BY displayorder DESC, lastpost DESC LIMIT 30
  18. Using where; Using filesort

  19. 0.001000s • DBLink 1 • source/class/table/table_forum_thread.php
  20. SELECT * FROM pre_forum_thread WHERE `fid` IN('52','53','54','51') AND `displayorder` IN('0','1') ORDER BY displayorder DESC, lastpost DESC LIMIT 30
  21. Using where; Using filesort

  22. 0.001000s • DBLink 1 • source/class/table/table_forum_post.php
  23. SELECT tid, posttableid FROM pre_forum_thread WHERE tid IN('1244280')

  24. 0.001000s • DBLink 1 • source/class/table/table_forum_post.php
  25. SELECT * FROM pre_forum_post WHERE tid=1244280 AND first=1

  26. 0.002000s • DBLink 1 • source/class/discuz/discuz_table.php
  27. SELECT * FROM pre_forum_threadaddviews WHERE `tid` IN('1244179','1243349','1243357','1244280','1244286','1244287','1244271','1244276','1244275','1244277','1244285','1244284','1244283','1244282','1244281','1244274','1244273','1244272','1244267','1244248','1244257','1244258','1244259','1244260','1244261','1244262','1244263','1244180','1244192','1244210','1244211','1244204','1244061')

  28. 0.000000s • DBLink 1 • source/class/discuz/discuz_table.php
  29. SELECT * FROM pre_common_member_verify WHERE `uid` IN('71941','70654','74280')

  30. 0.001001s • DBLink 1 • source/class/discuz/discuz_table_archive.php
  31. SELECT * FROM pre_common_member WHERE `uid` IN('70589','281')

  32. 0.001000s • DBLink 1 • source/class/discuz/discuz_table.php
  33. SELECT * FROM pre_common_cache WHERE `cachekey`='threadclasscount_51'

  34. 0.001000s • DBLink 1 • source/class/table/table_home_favorite.php
  35. SELECT * FROM pre_home_favorite WHERE uid=1 AND idtype='fid' ORDER BY dateline DESC

  36. 0.001000s • DBLink 1 • source/class/discuz/discuz_table.php
  37. SELECT count(*) FROM pre_security_failedlog

  38. 0.000000s • DBLink 1 • source/class/discuz/discuz_table.php
  39. UPDATE pre_common_session SET `sid`='cRobR9' , `ip1`='113' , `ip2`='239' , `ip3`='148' , `ip4`='42' , `uid`='1' , `username`='doloer' , `groupid`='1' , `invisible`='0' , `action`='2' , `lastactivity`='1407148868' , `fid`='51' , `tid`='0' , `lastolupdate`='1407148934' WHERE `sid`='cRobR9'
复制代码

 楼主| doloer 发表于 2014-8-4 18:54:52 | 显示全部楼层
目测问题可能出自 对 pre_forum_thread 的索引问题,貌似没有有效索引,可能是升级过来的索引异常?
修复N次都如此!!!  对于mysql的优化 也做到了位,同服务器,PHPCMS 的 250万数据,读取时间也不超过0.5。具体原因真的迷茫, 在后台查看主题的时候查询好像相对,快一些,肯定不能超过2秒就读取出来了!!
回复

使用道具 举报

pcyi 发表于 2014-8-5 08:33:51 | 显示全部楼层
楼主Discuz!X3.2的Debug模式在哪儿开启 之前X2.5之类方法不奏效
回复

使用道具 举报

 楼主| doloer 发表于 2014-8-7 18:16:14 | 显示全部楼层
pcyi 发表于 2014-8-5 08:33
楼主Discuz!X3.2的Debug模式在哪儿开启 之前X2.5之类方法不奏效

开启 debug 需要 debug 运行库支持,使用X3利系列的就可以  论坛里面有下载的!!

开启方式就是在 config 加上一句  $_config['debug'] = 'xxxx';   xxxx 相当于进入 debug 的密码!!!
回复

使用道具 举报

pcyi 发表于 2014-8-8 07:54:08 | 显示全部楼层
doloer 发表于 2014-8-7 18:16
开启 debug 需要 debug 运行库支持,使用X3利系列的就可以  论坛里面有下载的!!

开启方式就是在 con ...

我找找看X3系列的Debug文件,谢谢了
回复

使用道具 举报

 楼主| doloer 发表于 2014-8-8 17:56:37 | 显示全部楼层
就这么就沉下去了吗、???
回复

使用道具 举报

wang714806849 发表于 2014-8-9 07:50:19 | 显示全部楼层
还是用LINUX会快很多
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|Discuz! 官方站 ( 皖ICP备16010102号 )star

GMT+8, 2025-2-26 07:01 , Processed in 0.032368 second(s), 5 queries , Gzip On, Redis On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表