Whats taking so long?

AUChaseX

New Member
Hey everybody I need you help. I have written a search page that writes the results into a datagrid. The page has next and back buttons on it as well as a lable that tells you how many results were found. The problem is the first time it displays to the browser takes an unnecessary amount of time. The way it goes is it will show you the lablel showing how many results were found as well as the next button but then there is about a 10-45 second delay before the results are actually shown. And it gets even wierder, you can click on the next button and it will show the next page of results in about 2 seconds at which time you can hit the previous button and see the first page of results in about 2 more second thus avoiding the 10-45 second delay. Check it out at http://www.lightinguniverse.com/search/default.asp Any help would be appericated. Thanks!this the time for your query to build, search data and return to the application <BR>Optimizing your SQL query , seems to be the solution.<BR>once a query is runned it stays in the cache of the SQL server or you are using your Dataset to fill the row in the paging process <BR>It already has the data because it is counting the number of rows returned in order to be able to display the number of results. As well as the fact you can go forward a page and get the results for page 2 in a fraction of the time. In answer to your question I am filling the datalist and writing it into the cache. Then when you switch pages it just pulling out of the cache. So the ability to go to page 2 also indicated that data has already been written to the cache. Any other thoughts?
 
Back
Top