Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
mellamokb
Starting Member
39 Posts |
Posted - 2006-04-03 : 17:57:21
|
| HiI have an issue with the amount of time it takes for some of my pages to load up. I have a page that just displays information from the database from one table based on the user that is logged in, the current sorts/searches, etc. There is one user who has around 26000 records attributed to him. When transversing the pages, it takes much time for each page to load [because of the query], but only three records are displayed per page. As you can see, this can be VERY frustrating for the user when quickly jumping from page to page.On the server itself, it takes about 4-5 seconds for the query to run; I would like to minimize that time as much as possible. The problem is that the ENTIRE 26000 records is retrieved each time because the records must be sorted/searched, etc. and if the user is on page 5, the 13th, 14th, and 15th records should be displayed on the page given the current sort. Every time the user moves to another page, the query has to resort/search all 26000 records, then an ASP page finds the three records corresponding to the current page and then displays them on the page.I thought perhaps one possibility was to keep a connection from the ASP to the SQL database to that specific recordset as the user jumps from page to page. Is this possible? I don't want to resort the data every single time the user goes from page to page, because the query doesn't change unless sorts/searches are changed. In my ASP, I only change the SQL Query code when necessary, so I would like to only requery the SQL database itself as often as I change the code. Is there any simple, functional, and quick way to achieve this?Thank you very much in advance for your time and efforts =D.mellamokb |
|
|
darinh
Yak Posting Veteran
58 Posts |
Posted - 2006-04-03 : 18:41:18
|
| Search the Articles for Recordset Paging. There are lots of links to Articles that would probably help |
 |
|
|
|
|
|
|
|