From DataBase to JSON Array

Have around 35K DB entries and the full feed needs to be sent everyday from IS as in JSON Format.
We have SQL server 8 ,so converting to JSON format from SQL Select is ruled out.

When we write flow service to get the 35K record and loop over the record for JSON array (inside each JSON element we have few JSON arrays) , the time taken goes upto 40 mins. Which is as per coding standard not a healthy implementation.

Can you please suggest if there are any alternatives?

you may want to try to convert the DB sql results to a xml structure and use xslt to convert it to json.

i have done the same and then have used document To JSON webMethods service. But the problem is, we have few post processing steps which needs to be looped over the records and thus taking time for processing.

so do we have any alternative to simplify this?

can you select 1k records each time and process, then at the end, put all results into one result json?
looping through a tree with 350K records will slow down everything.

I feel the same logic as Tong mentioned and it would be good if you retrieve data in chunks and do your post processing and result or accumulate it to final doc for json…May be this way it is doable and handle the volumes.

HTH,
RMG