sql优化问题!!
表tab1(cola,colb)和表tab2(col1,col2)所有字段都是not null,在tab1的colb和tab2的col2上有索引,以下语句:
1、select a.cola, b.col1 from tab1 a, tab2 b where a.cola = b.col2;
2、select a.cola, b.col1 from tab1 a, tab2 b where a.cola = b.col2 and a.colb is not null;
哪一个语句的执行更快?说说表连接的优化策略,谢谢。