×

Loading...
Ad by
  • 最优利率和cashback可以申请特批,好信用好收入offer更好。请点链接扫码加微信咨询,Scotiabank -- Nick Zhang 6478812600。
Ad by
  • 最优利率和cashback可以申请特批,好信用好收入offer更好。请点链接扫码加微信咨询,Scotiabank -- Nick Zhang 6478812600。

check this

The goal of using cursor locks is to ensure separate applications don't interfere with one another. Multiuser database applications encounter concurrency problems whenever several users try to access or update the same information at the same time. Concurrency has to do with separate processes, running at the same time, trying to use the same item. With pessimistic cursor locks, you can temporarily prohibit either read access or changes by other applications. With optimistic cursor locks, you expect no concurrent changes and do not prohibit access or changes by other applications
Report

Replies, comments and Discussions:

  • 工作学习 / IT技术讨论 / 哪位DX有什么好的办法用VB快速插入数据到DB2中?谢谢!
    • ADO.Create your ODBC for your DB2, then use ADO
      • I am using ADO,but it is slow
        when insert bulk data, cost too much time.how to speed up the insert?
        Thanks!
        • 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(....)
          • what is the locktype should be made in ADODB connection for bulk insert?
            • 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.
              • thank you very much,i'll keep trying.
            • check this
              The goal of using cursor locks is to ensure separate applications don't interfere with one another. Multiuser database applications encounter concurrency problems whenever several users try to access or update the same information at the same time. Concurrency has to do with separate processes, running at the same time, trying to use the same item. With pessimistic cursor locks, you can temporarily prohibit either read access or changes by other applications. With optimistic cursor locks, you expect no concurrent changes and do not prohibit access or changes by other applications
          • 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.
            • that's what i'm think now. i'll test it later. Thank you, guys!
            • 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
              • 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.