I have several huge semicolon delimited text files that I import to tables, one table per file. The files are of size 200 - 300 kB and have more than 1,000,000 lines each. My problem is that it takes too much time to do the import. I am importing by using DoCmd.TransferText. (I am aware of my potential problem of max. database size of 2 GB.)
The tables have primary keys, have indexes, and have relations to other tables. I have seen that things are speeded up considerably if I remove keys, indexes and relations - but I do not like to do this.
I have read somewhere that things would be faster if I used transactions. BeginTrans before importing and CommitTrans after importing (because then indexing etc. is not done per record, but when everything is imported). But BeginTrans/CommitTrans does not function in connection with DoCmd.TransferText - as far as I can see.
How can I speed things up? Right now it takes hours to import data!
The tables have primary keys, have indexes, and have relations to other tables. I have seen that things are speeded up considerably if I remove keys, indexes and relations - but I do not like to do this.
I have read somewhere that things would be faster if I used transactions. BeginTrans before importing and CommitTrans after importing (because then indexing etc. is not done per record, but when everything is imported). But BeginTrans/CommitTrans does not function in connection with DoCmd.TransferText - as far as I can see.
How can I speed things up? Right now it takes hours to import data!