This topic has been archived. It cannot be replied.
-
工作学习 / IT技术讨论 / 哪位DX有什么好的办法用VB快速插入数据到DB2中?谢谢!
-helenintor(吃吧吃吧吃了就不结巴);
2003-8-20
(#1339528@0)
-
ADO.Create your ODBC for your DB2, then use ADO
-ivy_sh(呼吸着的青草);
2003-8-20
(#1339579@0)
-
I am using ADO,but it is slowwhen insert bulk data, cost too much time.how to speed up the insert?
Thanks!
-helenintor(吃吧吃吧吃了就不结巴);
2003-8-20
{78}
(#1339588@0)
-
of cause insert is slower than select. 1)create reasonable index in your table(that's the common way to speed up),2)check your lock type. 3)If you not insert every field,put fields name in into(....)
-ivy_sh(呼吸着的青草);
2003-8-20
(#1339618@0)
-
what is the locktype should be made in ADODB connection for bulk insert?
-helenintor(吃吧吃吧吃了就不结巴);
2003-8-20
(#1339629@0)
-
I am not sure is Pessimistic or Optimistic for bulk insert(maybe first one).You can do some research online. Check what's the default.If it not what you want,change it.
-ivy_sh(呼吸着的青草);
2003-8-20
(#1339661@0)
-
thank you very much,i'll keep trying.
-helenintor(吃吧吃吧吃了就不结巴);
2003-8-20
(#1339688@0)
-
check this
-ivy_sh(呼吸着的青草);
2003-8-20
{587}
(#1339668@0)
-
If you want to speed up the insertion for large bulk of data
, you'd better drop the indexes before inserting and recreate them after the insertion is done.
-yangn(Raymond);
2003-8-20
(#1339679@0)
-
that's what i'm think now. i'll test it later. Thank you, guys!
-helenintor(吃吧吃吧吃了就不结巴);
2003-8-20
(#1339695@0)
-
Yes,index will slow insert,that's why I said reasonable index.Also I don't think it's the best way to drop index before do insert,'cause that will allow invalid or duplicate records inserted.I like keep tables structure stable
-ivy_sh(呼吸着的青草);
2003-8-20
{35}
(#1339705@0)
-
1. There is no so called reasonable indexes to speed up the insertion at all . The existance of any index will always slow down the insertion. .Index is beneficial for select and sometimes for update/delete to some degree
2. Even without index , it is still possible to prevent the invalid records from being inserted with some sort of contraints. In other words. the main purpose of index is not for the validation of data but for the performance of retrieval.
-yangn(Raymond);
2003-8-20
{320}
(#1339724@0)