给一些数据表的字段添加索引,有效提高查询速度。
ALTER TABLE `cdb_pms` ADD INDEX ( `folder` );
ALTER TABLE `cdb_threads` ADD INDEX ( `displayorder` );
ALTER TABLE `cdb_threads` ADD INDEX ( `dateline` );
ALTER TABLE `cdb_threads` ADD INDEX ( `closed` );
ALTER TABLE `cdb_threadsmod` ADD INDEX ( `dateline` );
ALTER TABLE `cdb_sessions` ADD INDEX ( `invisible` );
ALTER TABLE `cdb_forums` ADD INDEX ( `type` );
ALTER TABLE `cdb_forums` ADD INDEX ( `displayorder` );
discuz |
|
|||
location / {
root /home/www/typengine; index index.php index.html index.htm; rewrite ^([^\.]*)/topic-(.+)\.html$ $1/portal.php?mod=topic&topic=$2 last; rewrite ^([^\.]*)/article-([0-9]+)\.html$ $1/portal.php?mod=view&aid=$2 last; rewrite ^([^\.]*)/forum-(\w+)-([0-9]+)\.html$ $1/forum.php?mod=forumdisplay&fid=$2&page=$3 last; |
|||
DirectoryIndex index.php index.html index.htm pagename.html
RewriteEngine On RewriteBase / RewriteRule ^archiver/((fid|tid)-[\w\-]+\.html)$ archiver/index.php?$1 RewriteRule ^forum-([0-9]+)-([0-9]+)\.html$ forumdisplay.php?fid=$1&page=$2 RewriteRule ^thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ viewthread.php?tid=$1&extra=page\%3D$3&page=$2 RewriteRule ^space-(username|uid)-(.+)\.html$ space.php?$1=$2 RewriteRule ^tag-(.+)\.html$ tag.php?name=$1 RewriteRule ^index\.html index.php
|
|||
Discuz!在Nginx下的Rewrite |
|||