ConvertToString Performance

Hello fellow wM Users,

I am selecting a large (35K) number of small rows from a DB, which I need to write to a flat file and then ftp. The steps are as follows:

Select records
Loop over
…CovertToString (to create flat file)
…Map
End Loop
blah blah blah

The process is working, but convertToString is taking a very long time. Any ideas on how to maximize performance???

Hi,
have you tried to get the numbers as strings directly out of the DB with your SQL-Statement (like: to_char(numberfield)

Ralf

The convertToString function writes the data to a flat file. We need it…

How about building the records from database first before you use the convertToString?

Loop Over (in:Database Conditions; out:outRecords)
select from database and map to outRecords
End Loop

convertToString(outRecords)

of couse you need to make sure ur schema records change to record list

WriteToFile service can be used to write records to the file.

hi i m using webmethod 6.1 but I am unable to find out " Sample.io.test:writetofile" service


can any one give the idea to write into file without using this or its alternative plz…

Hi,

Going back to the performance issue, according to my experience you will get a very good performance boost if you convert the convert to String invoke step to a transformer step. My two cents explanation for performance improvement is as follows.

If you invoke a service, webMethods will try to create a copy of input pipeline , do the processing and then merge the results into already created copy of output pipeline. This is very important to do the way webMethods is doing, but for a task like covertToString, if you have declared the service signature properly not relying on the implicit variables, then you should be able to convert the invoke service to Transformer, by doing this webMethods only deals with what has been mapped as the input and what has been mapped as the output, and hence a lot of memory declaration is avoided. When you do these test on 1 or 100 records you won’t find a huge performance difference. But when you test this on a large number of records then you will for sure will find it to be better (or atleast I found it).

Cheers,
Ram

You can also find this service in PSUtilities package…You can copy this service into your custom package and use it.

HTH,
RMG