Question
Large Text Import to SQL
I was hoping someone could offer some insight on this issue, because I have the feeling that it's not a terribly rare one.
I have a relatively large text file in fixed-width format, roughly 40,000 rows, that needs to be uploaded and imported into a table. This works fine for other tables but, for one table with roughly 15 fields, the script times out consistently. If I cut it down to roughly 20,000 rows, it runs fine.
I'm executing this through a file loop and doing individual insert queries on each iteration. At the end, a stored procedure also has to be run, and that takes several seconds to execute.
Simply changing the request timeout in CF Admin is not an option.
I'm not overly familiar with threading, so I'm not sure if that could help or not. I did notice that it maxes out at 5,000.
Maybe I could loop through parts of the file and that would help mitigate the timeout?
Any help appreciated.
Thanks.
I have a relatively large text file in fixed-width format, roughly 40,000 rows, that needs to be uploaded and imported into a table. This works fine for other tables but, for one table with roughly 15 fields, the script times out consistently. If I cut it down to roughly 20,000 rows, it runs fine.
I'm executing this through a file loop and doing individual insert queries on each iteration. At the end, a stored procedure also has to be run, and that takes several seconds to execute.
Simply changing the request timeout in CF Admin is not an option.
I'm not overly familiar with threading, so I'm not sure if that could help or not. I did notice that it maxes out at 5,000.
Maybe I could loop through parts of the file and that would help mitigate the timeout?
Any help appreciated.
Thanks.
