1:insert into table(aa)
select aa from table1 wheren aa not in (select aa from table2)
这样的追加语句速度怎么那么慢啊?还有什么更好的方法来追加吗?假如table表中有10万记录,table1表中有10000,在table2中有100000记录.执行上面的语句速度要几个小时,晕死了.
2:另外:like 在数据库内执行速度比较快,但在程序中使用发现速度狂慢(尤其记录多的时候),请问还有什么好的方法解决啊?
select aa from table1 wheren aa not in (select aa from table2)
这样的追加语句速度怎么那么慢啊?还有什么更好的方法来追加吗?假如table表中有10万记录,table1表中有10000,在table2中有100000记录.执行上面的语句速度要几个小时,晕死了.
2:另外:like 在数据库内执行速度比较快,但在程序中使用发现速度狂慢(尤其记录多的时候),请问还有什么好的方法解决啊?
select aa from table1 wheren not exists(select * from table2 where table2.aa=table1.aa)