Home >Backend Development >PHP Tutorial >首页加载速度缓慢,有办法优化吗?该如何解决

首页加载速度缓慢,有办法优化吗?该如何解决

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-13 11:45:581212browse

首页加载速度缓慢,有办法优化吗?
首页有十五个sql语句涉及7个数据表,加载速度极慢(大概6秒,2Mb带宽),有什么办法优化吗?
------解决方案--------------------
看来是要优化你的SQL了。index,缓存
------解决方案--------------------
2mb 6sec 并不能说极慢,只是稍慢
你可以缓存首页查询结果,使数据库查询的影响减到最小
如果效果不明显,则说明是你的页面布局不合理,嵌套太多
------解决方案--------------------
首页缓存起来吧,动态数据的话,就用ajax请求。另外建立必要的索引

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn