- 註冊時間
- 2002-7-24
- 線上時間
- 48 小時
- 閱讀權限
- 255
- 積分
- 783
- 主題
- 139
- 精華
- 5
- 文章
- 555
該用戶從未簽到 - 文章
- 555
|
你想加快整個 DZ!2 的執行速度嗎?
MySQL 版本是 4.0.xx 會更快
# 後台數據庫升級: 升級後可加快 D2 的執行速度
# 加速原理是加入 SQL '索引'
- ALTER TABLE `cdb_threads` ADD INDEX ( `fid` );
- ALTER TABLE `cdb_threads` ADD INDEX `dateline` ( `topped` , `dateline` , `fid` );
- ALTER TABLE `cdb_forums` ADD INDEX ( `fid` , `type` );
- ALTER TABLE `cdb_forums` ADD INDEX ( `type` , `status` );
- ALTER TABLE `cdb_forums` CHANGE `moderator` `moderator` VARCHAR( 255 ) NOT NULL;
- ALTER TABLE `cdb_forums` ADD INDEX ( `moderator` );
- ALTER TABLE `cdb_forums` ADD INDEX ( `name` );
- ALTER TABLE `cdb_sessions` ADD INDEX ( `ip` );
- ALTER TABLE `cdb_members` ADD INDEX ( `status` );
- ALTER TABLE `cdb_members` ADD INDEX ( `lastvisit` );
- ALTER TABLE `cdb_members` ADD INDEX ( `regdate` );
- ALTER TABLE `cdb_members` ADD INDEX ( `avatar` );
複製代碼
# 加速完畢
以下是裝了後會員的回覆
Originally posted by MelonKing at 2003-12-6 10:22 PM:
我從0.12變成0.05
是快了多....
但是不知道是不是真的有負面影響...
Originally posted by ak-47 at 2003-12-6 10:37 PM:
現在是Processed in 0.049340 second(s), 6 queries
原本是Processed in 0.07xxxxx second(s), 6 queries
Originally posted by hehachris at 2003-12-6 11:17 PM:
哇, 好像真的快了!
原本是Processed in 0.226584 second(s), 15 queries
現在是Processed in 0.074303 second(s), 15 queries
Originally posted by lewis at 2003-12-7 01:14 AM:
感,好像真的快了
以前是0.296590 second(s), 9 queries
在0.035460 second(s), 9 queries
MySQL 版本 4.0.12
Originally posted by musichk at 2003-12-7 02:00 AM:
嚇死人, 我個站......
http://forum.musichk.org
原來:
Processed in 1.692053 second(s), 14 queries, Gzip enabled
升級後:
Processed in 0.232329 second(s), 14 queries, Gzip enabled
... |
|