CSV file creation tme is more
I am creating CSV file using following code:-
Set MyRecordset = objCon.Execute(QueryName)
nColumns = MyRecordset.Fields.Count
If nColumns > 0 Then
Set fso = CreateObject("Scripting.FileSystemObject")
Set wrtlog = fso.OpenTextFile("C:\QTP\CSV.txt", 8,true )
For k = 0 to nColumns-1
wrtlog.Write(MyRecordset.Fields(k).Name & ",")
j=2 ' the column names are printed in the first row thats why started the data population from second row.
Do While Not MyRecordset.EOF
For i=0 to nColumns-1
wrtlog.Write(MyRecordset.Fields( rval ) & ",")
This code is taking lot of time to create CSV file, like say for 10000 rows with 50 cols, it is taking 10 mins to create CSV or text file while running on local databse say Access. But If I am running this on teradata or sybase DB which is kept Onshore somewhere, it takes around 1 hr or more. Is there any way I can increase the performance, bcoz I might have to validate and compare billions of record. Then I might need to think on using Perl Script directly on server bcoz vbscript will not work on Unix box.
Appreciate your quick response.
Re: CSV file creation tme is more
Set your script to run in fast mode and then see what happens