You could look into paging through those results if your looking to shorten each page and don't mind spreading em across multiple pages.
Also, response.Flush may actually slow your system down if you end up sending a bunch of unfilled packets. I think letting the buffer take care of everything by itself (without using Flush) may speed it up a little.
I hope your not looping through your recordset, but in the event that you are, consider using the GetRows method f the recordset to get the data back as an array, then loop through the array. you should see a 7x to 12x efficiency increase in your loop.
Code:
'pretend our RecordSet is MyRS
Dim arr_results
arr_results = MyRS.GetRows()
'loop throught records - second index is record index, first is field index
For i = 0 To UBound(arr_results,2)
'do whatever with field
Next
Try using the timer method/object/thing at the top of your page and the bottom, the print the difference to the screen. I am willing to bet that more than half of the time is not processing the page, but transmitting it to the client and then waiting will the client laboriously displays it:
Code:
<%
Option Explicit
Dim start_time
start_time = timer
'lots of code
'lots more code
Response.Write "Execution Time: " & timer - start_time & "s"
%>
Also, when dealing with that many records, if they are coming from multiple tables try to use INNER JOINs rather than cross joins (or commas) in your select statement, this will speed up the database execution time:
Code:
"SELECT a, b, c, d FROM Table1, Table2, Table3...etc" <-- Bad
"SELECT a, b, c, d FROM ((Table1 INNER JOIN Table2 ON Table1.a = Table2.b) INNER JOIN Table3...etc" <-- good
The reason for making this switch is because the database akes a temporary table of everything in the FROM portion of the clause before applying the WHERE portion. When crossing table it will make a temporary table of literally every combination of the records from each table, then try to filter that monstrosity. Wen using an INNER JOIN/OUTER JOIN/etc the database uses the built-in ON conditions while building the temporary table, thus having a much smaller (and more relevant) set of records to filter with the WHERE arguments.
There are also FAQs and at least one huge thread on eficiency. Try the Search tab above and you'll find all kinds of good stuff.
-T
01000111 01101111 01110100 00100000 01000011 01101111 01100110 01100110 01100101 01100101 00111111
The never-completed website: