有这个用法么?我还没看过呢!
原帖由 xblues 于 15-6-2009 18:57 发表
SQL语句分两种,一种是数据操作语句 DML,一种是数据定义语句 DDL
SQL can be divided into two parts: The Data Manipulation Language (DML) and the Data Definition Language (DDL).
The query and update c ...
SELECT p.subject AS re_subject, p.message, t.* FROM cdb_threads t LEFT JOIN cdb_posts p ON (t.tid=p.tid AND t.lastpost=p.dateline)
WHERE t.fid IN (7053, 200, 7033, 7062, 7061, 7036, 7035, 7067) AND t.displayorder IN (0)
ORDER BY t.lastpost DESC
LIMIT 25798, 30;
组合索引,需要再看看,你先简单的建立基于单个字段的独立索引看看?
原帖由 ubuntuhk 于 15-6-2009 21:18 发表
SELECT p.subject AS re_subject, p.message, t.* FROM cdb_threads t LEFT JOIN cdb_posts p ON (t.tid=p.tid AND t.lastpost=p.dateline)
WHERE t.fid IN (7053, 200, 7033, 7062, 7061, 7036, 7035, 7067) AND t.displayorder IN (0)
ORDER BY t.lastpost DESC
LIMIT 25798, 30;
我一直在用的,而且用了好几年的,还有一个不对

| 欢迎光临 FreeOZ论坛 (https://www.freeoz.org/ibbs/) | Powered by Discuz! X3.2 |