Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Improving speed to Import a text file into Access DB AD
Message
 
À
07/01/2002 14:42:08
Information générale
Forum:
Visual Basic
Catégorie:
Bases de données DAO/RDO/ODBC/ADO
Divers
Thread ID:
00601606
Message ID:
00602222
Vues:
25
>Hello everybody,
>I have a text file of 25000 lines, and I want to import it into 70 tables Access database.
>Every line should be added to one table depending on the first and the 14-th and 15-th letters of each line of the text file. I’m using ADO recordset to do it.
>In my project I’m using the data environment where all my commands are created at design time. All recorsets are opened one time and closed one time during all the process.
>The problem is the time taken to import the file (9 minutes)(My PC is IBM ThinkPad Pentium 111 366 Mhz). I think it’s not acceptable for a file of 25000 lines. I thought to resolve my problem by using a direct SQL query (Insert into) instead of ADO recordset.addnew. Unfortunately no positive results with this approach. Can anybody help me, to improve the speed of the importing program?
>I got sick and tired with this program, Please help me.
>I have a test project to see how this program works; I can email it to you if you wish to test it on your own.
>PS: I have Windows 2000 As OS, VB6 Sp5 and ADO 2.6
>Thanks in advance
>Robert

Hi,

Take into consideration indexes associated with tables in MDB Access file. For example, if you have a couple of indexes for each table, then you have about 2*70=140 indexes. They also got updated and it also takes time. It is good also compact MDB file before and after such large append work.

Just my 2 cents.
Igor Gelin
Database Developer
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform