How do I insert 800000 records into an MS Access table?

前端 未结 16 1064
故里飘歌
故里飘歌 2020-12-17 04:13

I need to insert 800000 records into an MS Access table. I am using Delphi 2007 and the TAdoXxxx components. The table contains some integer fields, one float f

16条回答
  •  清歌不尽
    2020-12-17 04:55

    How fast is your disk turning? If it's 7200RPM, then 800,000 rows in 3 minutes is still 37 rows per disk revolution. I don't think you're going to do much better than that.

    Meanwhile, if the goal is to streamline the process, how about a table link?

    You say you can't access the source database via ADO. Can you set up a table link in MS Access to a table or view in the source database? Then a simple append query from the table link would copy the data over from the source database to the target database for you. I'm not sure, but I think this would be pretty fast.

    If you can't set up a table link until runtime, maybe you could build the table link programatically via ADO, then build the append query programatically, then invoke the append query.

提交回复
热议问题