General information
Category:
Coding, syntax & commands
>Tom,
>
>If you have a newid.prg which contains the function make sure you don't have a line function NewID() in the code. Just comment it out and use LPARAMETERS if there are arguments. The NewID() function will work about a factor of 20 faster.
>
>Other than that you might check to make sure where the real slowdown is occuring. Opening and closing files is a fairly slow operation opening a few million files is just going to take a lot of time, especially if a network is involved.
>
>Are you doing string processing of the files? VFP string functions can be slow maybe calling a VC++ DLL would make it faster.
>
>You could temporarily take out the default value if you don't need it as a key for relational links, and just run a single REPLACE after the import to update the table.
>
>>I have a project where I need to load in a few million
>>text files to one of two tables. I am using a primary
>>key that is assigned via a stored procedure routine
>>similar to the one used in TasTrade (newid()).
>>
>>The first file contains 1.2 million records and after
>>22 hours it is only about 1/2 complete.
>>
>>Would it have been better to not set NEWID() as
>>the default value and used a different technique?
David, thanks for the response. The newid() function is truly
a stored procedure in the database container it is not a standalone
PRG.
I am curious as to how I could use a VC++ DLL since I do not
know C++. I am curious about the API section of the help file that
contains things such as _EdCopy and _EdPaste. I have no
idea how to use the _APIs. This is probably somewhat off
the original topic, but could you show me how these work or
do I need to have C++?
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only