NoCoolHandle
Programmer
Hi,
I have a query that returns a large amount of JSON data via SQLs FOR JSON clause.
The dataset is around 6 million rows being squeezed into a single column/row of JSON data.
My problem is trying to read that efficiently in a C# based Restful webservice.
Currently I am returning it into a data reader and then calling Read until the datareader is empty (remember this gets returned as a single row/column in Management Studio.
In Management Studio the query takes around 35 seconds.
In my webservice using a data adapter it "times out" and crashes. (500 error)
If I use a DataReader and use the above methodology it will also time out unless I reduce the number of rows to only 500k (from the 5,700,000 rows without any filters/paging.) - even 500k takes around 60 seconds.. The full dataset will NEVER return.
Any ideas as to how to get all the data quickly?
Thanks in advance!!
Rob
I have a query that returns a large amount of JSON data via SQLs FOR JSON clause.
The dataset is around 6 million rows being squeezed into a single column/row of JSON data.
My problem is trying to read that efficiently in a C# based Restful webservice.
Currently I am returning it into a data reader and then calling Read until the datareader is empty (remember this gets returned as a single row/column in Management Studio.
In Management Studio the query takes around 35 seconds.
In my webservice using a data adapter it "times out" and crashes. (500 error)
If I use a DataReader and use the above methodology it will also time out unless I reduce the number of rows to only 500k (from the 5,700,000 rows without any filters/paging.) - even 500k takes around 60 seconds.. The full dataset will NEVER return.
Any ideas as to how to get all the data quickly?
Thanks in advance!!
Rob