请各位大侠帮忙看看,
INSERT INTO table1(tab1_code,date,addDtime,Adder) select tab2_code,'2005-5-8',getdate(),'123456' from table2 where tab2_code not in (select tab1_code from table1
where date='2005-5-8' ) and tab2_code2='001'
vb+sqlserver2000
这个是我写的插入语句(批量插入,每次插入300左右的数据),date,tab1_code,CancCode(删除标记)做联合主建,
tab1_code从table2中的字段tab2_code得到,
表中的数据大概到6、7万的时候执行插入就非常慢,请大家帮忙看看,是什么原因呢?
表中的数据多,但是要插入和查出的不多,数据库中的数据如果10万以下的时候,也就是比较少的时候速度正常,能够插入和查出,可是数据表中的数据在10几万的时候就非常慢了,