宇宙主机交流论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

欧基零壹微头条IP归属甄别会员请立即修改密码
查看: 3484|回复: 20

经过测试网站打开缓慢与php无直接关系

[复制链接]
发表于 2013-3-13 21:38:09 | 显示全部楼层 |阅读模式
  1. /usr/sbin/mysqld, Version: 5.1.66-0+squeeze1-log ((Debian)). started with:
  2. Tcp port: 3306  Unix socket: /var/run/mysqld/mysqld.sock
  3. Time                 Id Command    Argument
  4. # Time: 130313 21:38:12
  5. # User@Host: debian-sys-maint[debian-sys-maint] @ localhost []
  6. # Query_time: 0.000497  Lock_time: 0.000163 Rows_sent: 1  Rows_examined: 5
  7. SET timestamp=1363181892;
  8. SELECT count(*) FROM mysql.user WHERE user='root' and password='';
  9. # User@Host: debian-sys-maint[debian-sys-maint] @ localhost []
  10. # Query_time: 0.015748  Lock_time: 0.000267 Rows_sent: 36  Rows_examined: 58
  11. SET timestamp=1363181892;
  12. select concat('select count(*) into @discard from `',
  13.                     TABLE_SCHEMA, '`.`', TABLE_NAME, '`')
  14.       from information_schema.TABLES where ENGINE='MyISAM';
  15. # User@Host: debian-sys-maint[debian-sys-maint] @ localhost []
  16. # Query_time: 0.025962  Lock_time: 0.000291 Rows_sent: 0  Rows_examined: 590
  17. SET timestamp=1363181892;
  18. select count(*) into @discard from `information_schema`.`COLUMNS`;
  19. # User@Host: debian-sys-maint[debian-sys-maint] @ localhost []
  20. # Query_time: 0.000553  Lock_time: 0.000426 Rows_sent: 0  Rows_examined: 0
  21. SET timestamp=1363181892;
  22. select count(*) into @discard from `information_schema`.`EVENTS`;
  23. # User@Host: debian-sys-maint[debian-sys-maint] @ localhost []
  24. # Query_time: 0.028746  Lock_time: 0.000403 Rows_sent: 0  Rows_examined: 58
  25. SET timestamp=1363181892;
  26. select count(*) into @discard from `information_schema`.`PARTITIONS`;
  27. # User@Host: debian-sys-maint[debian-sys-maint] @ localhost []
  28. # Query_time: 0.000478  Lock_time: 0.000212 Rows_sent: 0  Rows_examined: 10
  29. SET timestamp=1363181892;
  30. select count(*) into @discard from `information_schema`.`PLUGINS`;
  31. # User@Host: debian-sys-maint[debian-sys-maint] @ localhost []
  32. # Query_time: 0.000345  Lock_time: 0.000194 Rows_sent: 0  Rows_examined: 1
  33. SET timestamp=1363181892;
  34. select count(*) into @discard from `information_schema`.`PROCESSLIST`;
  35. # User@Host: debian-sys-maint[debian-sys-maint] @ localhost []
  36. # Query_time: 0.000396  Lock_time: 0.000293 Rows_sent: 0  Rows_examined: 0
  37. SET timestamp=1363181892;
  38. select count(*) into @discard from `information_schema`.`ROUTINES`;
  39. # User@Host: debian-sys-maint[debian-sys-maint] @ localhost []
  40. # Query_time: 0.002947  Lock_time: 0.000247 Rows_sent: 0  Rows_examined: 0
  41. SET timestamp=1363181892;
  42. select count(*) into @discard from `information_schema`.`TRIGGERS`;
  43. # User@Host: debian-sys-maint[debian-sys-maint] @ localhost []
  44. # Query_time: 0.002985  Lock_time: 0.000246 Rows_sent: 0  Rows_examined: 0
  45. SET timestamp=1363181892;
  46. select count(*) into @discard from `information_schema`.`VIEWS`;
  47. # Time: 130313 21:39:24
  48. # User@Host: aabbcc[aabbcc] @ localhost []
  49. # Query_time: 0.001011  Lock_time: 0.000059 Rows_sent: 52  Rows_examined: 52
  50. use aabbcc;
  51. SET timestamp=1363181964;
  52. SELECT *  FROM typecho_options WHERE  (`user` = 0 );
  53. # User@Host: aabbcc[aabbcc] @ localhost []
  54. # Query_time: 0.000126  Lock_time: 0.000031 Rows_sent: 0  Rows_examined: 52
  55. SET timestamp=1363181964;
  56. SELECT *  FROM typecho_options WHERE  (`user` = '1' );
  57. # Time: 130313 21:39:28
  58. # User@Host: aabbcc[aabbcc] @ localhost []
  59. # Query_time: 0.001375  Lock_time: 0.000151 Rows_sent: 2  Rows_examined: 4
  60. SET timestamp=1363181968;
  61. SELECT typecho_comments.`coid` , typecho_comments.`cid` , typecho_comments.`author` , typecho_comments.`mail` , typecho_comments.`url` , typecho_comments.`ip` , typecho_comments.`authorId` , typecho_comments.`ownerId` , typecho_comments.`agent` , typecho_comments.`text` , typecho_comments.`type` , typecho_comments.`status` , typecho_comments.`parent` , typecho_comments.`created`  FROM typecho_comments WHERE  (typecho_comments.`status` = 'approved' ) AND (`ownerId` <> `authorId` ) ORDER BY typecho_comments.`coid`  DESC LIMIT 10;
  62. # Time: 130313 21:39:41
  63. # User@Host: aabbcc[aabbcc] @ localhost []
  64. # Query_time: 12.555035  Lock_time: 0.000053 Rows_sent: 30  Rows_examined: 15135
  65. SET timestamp=1363181981;
  66. SELECT *  FROM typecho_contents WHERE  (`status` = 'publish' ) AND (`type` = 'post' ) ORDER BY RAND()  ASC LIMIT 30;
  67. # User@Host: aabbcc[aabbcc] @ localhost []
  68. # Query_time: 0.000330  Lock_time: 0.000065 Rows_sent: 24  Rows_examined: 58
  69. SET timestamp=1363181981;
  70. SELECT *  FROM typecho_metas WHERE  (`type` = 'tag' ) AND (`count` > 0 ) ORDER BY `count`  DESC LIMIT 28;
  71. # User@Host: aabbcc[aabbcc] @ localhost []
  72. # Query_time: 0.000295  Lock_time: 0.000087 Rows_sent: 10  Rows_examined: 44
  73. SET timestamp=1363181981;
  74. SELECT *  FROM typecho_metas WHERE  (`type` = 'category' ) ORDER BY typecho_metas.`order`  ASC;
  75. # Time: 130313 21:40:20
  76. # User@Host: aabbcc[aabbcc] @ localhost []
  77. # Query_time: 9.610633  Lock_time: 0.000123 Rows_sent: 30  Rows_examined: 15135
  78. SET timestamp=1363182020;
  79. SELECT *  FROM typecho_contents WHERE  (`status` = 'publish' ) AND (`type` = 'post' ) ORDER BY RAND()  ASC LIMIT 30;
  80. # Time: 130313 21:40:56
  81. # User@Host: aabbcc[aabbcc] @ localhost []
  82. # Query_time: 7.751408  Lock_time: 0.000074 Rows_sent: 30  Rows_examined: 15135
  83. SET timestamp=1363182056;
  84. SELECT *  FROM typecho_contents WHERE  (`status` = 'publish' ) AND (`type` = 'post' ) ORDER BY RAND()  ASC LIMIT 30;
  85. # Time: 130313 21:41:09
  86. # User@Host: aabbcc[aabbcc] @ localhost []
  87. # Query_time: 8.684856  Lock_time: 0.000103 Rows_sent: 30  Rows_examined: 15135
  88. SET timestamp=1363182069;
  89. SELECT *  FROM typecho_contents WHERE  (`status` = 'publish' ) AND (`type` = 'post' ) ORDER BY RAND()  ASC LIMIT 30;
复制代码
求带 每次查询时间基本7 -15秒 这Y怎么受得了   机子内存不够?


my.rar (2.14 KB, 下载次数: 376)

发表于 2013-3-13 21:38:46 | 显示全部楼层
       看的晕乎乎的                                                                                                                                                       ——来自MJJ果冻的挂机宝
发表于 2013-3-13 21:57:53 | 显示全部楼层
看不懂
发表于 2013-3-13 21:59:26 | 显示全部楼层
_____________Cc 发表于 2013-3-13 21:38
看的晕乎乎的                                                                                  ...

+1
发表于 2013-3-13 22:06:44 | 显示全部楼层
发slow-queries.log
发表于 2013-3-13 22:07:03 | 显示全部楼层
晕乎乎的飘过~~
 楼主| 发表于 2013-3-13 22:15:14 | 显示全部楼层
wdlth 发表于 2013-3-13 22:06
发slow-queries.log

这个就是
发表于 2013-3-13 22:19:57 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
发表于 2013-3-13 22:30:07 | 显示全部楼层
大胡子。。。优化下php的SQL语句。。。
发表于 2013-3-13 22:31:38 | 显示全部楼层
大胡子 发表于 2013-3-13 22:15
这个就是


看来有点索引不对,发show status和表结构出来看看。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|宇宙主机交流论坛

GMT+8, 2024-10-31 23:18 , Processed in 0.170048 second(s), 13 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

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