A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Importing huge text files



 
 
Thread Tools Display Modes
  #1  
Old November 5th, 2008, 09:38 AM posted to microsoft.public.access
Helge V. Larsen
external usenet poster
 
Posts: 26
Default Importing huge text files

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!


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 08:58 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.