How to optimize the HTML generation speed of DedecmsV3.1 _ php skills
Source: Internet
Author: User
The optimization of dedemsv3.1 HTML generation speed is due to version compatibility and other reasons. In fact, dedecms indexes are a bit messy. if the index is set appropriately, the generation speed of dedecmsHTML is affected, it is mainly used to obtain the list of articles not sorted by default. due to the need to re-sort the list, the speed of large data volumes is not ideal. you can perform the following steps to easily optimize the list:
1. go to phpmyadmin and delete the dedecms site dede_archives except the index of the ID primary key;
2. use SQL to create the following indexes:
Alter TABLE '# @__ archives 'add index'click' ('click ');
Alter TABLE '# @__ archives 'add INDEX 'typeid' ('typeid ');
Alter TABLE '# @__ archives 'add index' arcrank' ('arcrank ');
Alter TABLE '# @__ archives 'add index' sortrank' ('sortrank ');
Alter TABLE '# @__ archives 'add INDEX 'senddate' ('senddate ');
Alter TABLE '# @__ archives 'add INDEX 'pubdate' ('pubdate ');
Alter TABLE '#@__ archives 'add INDEX 'litpic' ('litpic ');
Alter TABLE '# @__ archives 'add index' typeid2' ('typeid2 ');
When the data volume is about 1 w-10w, after such optimization, if the content page does not have the mark of the relevant article, the generation speed will be three to five times faster.
If there is a related article mark, it will be two to three times faster
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.