I'm trying to export large excel files from database (client request). I currently use two selects to get data from two tables and store them in two sqldatasets. I have a delay before the file starts uploading since each table gives up to 100k rows.
I've turned off the outputbuffer in the httphandler, and I export each row from the first table as its' own vb.net html table (with dependent rows from the second dataset). Once the upload begins, it's very fast, but client still wants to get rid of that delay.
I was thinking I could break up the two large selects into many small selects to use as I build the html tables, opening and closing each connection.
Can sql server handle it?
What are the downsides?
I've looked everywhere and can find nothing. Many thanks in advance!
Limitations
The second table is dependent upon the first table, so I can either hit it once for everything and loop or many time for each row of the first table...right?...