I'm trying to import 100K records into the Contact table 5050 and the performance is very poor. No calculations or anything simply name, address, etc... 40K records takes roughly 4 hours. I have tried increasing cache settings but no big difference. Any way to speed up the load time? I'm thinking I'm just missing some magic setting. It can't possibly take this long for real. I have literally loaded billions of records in that kind of time with Informix.
0
Comments
With any system, importing a large file will take a long time.
AP Commerce, Inc. = where I work
Getting Started with Dynamics NAV 2013 Application Development = my book
Implementing Microsoft Dynamics NAV - 3rd Edition = my 2nd book
You are probably referring to this (very old) thread: Import ASCII-file 150.000 lines (50 MB). I'll see if I can find the code in some database.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
Actually I tried on Both Native and SQL. In production it will be SQL.
I don't have any code in the dataport. I'm migrating this data from KMA. I will try running the client on the server too. Still pretty new to Navision, lots to learn. Thanx.
The problem that we had is thta even though we use 50 000 line files for some reason dataport inserts less then that(stops somewhere) and says that import is complete and successful. however I know that only first x amount of records got imported.... and this "x" amount is different every time!!!!! :evil:
So i have converted this dataport into the report. looks like it works. But the ideal situation is to create maaaaaany smal files. Is there a utility to do that?
Oleg
There is hjsplit, it splits based on size. So what you have to do afterwards is to check and make sure that it didn't split the last line in two. Otherwise it works fine.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
1. Splitting large file into number of smaller - true bard sometimes hard to do it
2. Make a COMMIT after a 1K (10K...) records - highly recomended
3. Make appropriate free space in database.
4. Invoke only neccessary VALIDATE (ON INSERT) triggers.
5. Import records into some new empty table and then move them into right table
6. Make sure that client and imported file is on the same computer.
It should work fine (and FAST) if you don``t have any sumindex fields in the table. I dont`t beleive Navision is able to calculate those fields if there are any.
Best regards ObiWan
1. The most important part is that you split up the large text-file into smaller files. But you must be sure to split the file at the end of a line, and not in the middle of a line. Because I didn't find a program at that time to split up files not into equal chunks of eg. 1 MB, but into chunks of eg. 1000 lines, I wrote something in Visual Basic 6:
This VB routine will generate files with names items_1.txt, items_2.txt etc.
2. This dataport will start with the first file items_1.txt and after the import, it will check if another file with the next number exists. If it can find such file, it will run itself and continue with this one. And then up to the next one. etc.
This is not a complete dataport, but it has the overall structure. Important is the code inside the OnInitDataPort-, OnPreDataPort- and OnPostDataPort-triggers.
Hope this is somewhat useful.
See
http://www.mibuso.com/forum/viewtopic.php?t=9615
To import faster: disable all secondary keys and/or flowfields you don't need!
After the import, enable them again.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
(Except when you need to recover the situation when one of the developers accidentally deletes a couple of GL ledger entries
Regards,
Amer
The performance slows down dramtically if you have additional fields to import.
AP Commerce, Inc. = where I work
Getting Started with Dynamics NAV 2013 Application Development = my book
Implementing Microsoft Dynamics NAV - 3rd Edition = my 2nd book