[Quote=引用 6 楼 kun_bu 的回复:]
CREATE TABLE t1 (a int not null primary key, b int, c int);
CREATE TABLE t2 (id int not null auto_increment primary key, a int, d int);
select t1.a, t1.b, t1.c, t2.d from t1, t2 where (t1.a = t2.a and t2.e = 123)
如何对这个语句进行优化
[/Quote]
从你这里提供的信息看来,你这里面已经是最好的内联接了
我觉得如果你是基于这个SQL来优化的话,那建议你考虑对t1(a)建立索引,对t2(e,a)建立索引