Hello!
I am fairly new to SQL programming, but I have a fairly decent amount of knowledge about the basics. What I am trying to do is perform a search on a very large table (millions of rows) with the possibility that the result could contain thousands of rows. I want my recordset to only return 50 rows. I want to be able to view the first 50 rows OR the second 50 rows OR the 100th 50 rows. Does that make sense? I know how to do this using a temp table, but the method I know still requires the time to return ALL the rows to the temp table and then grab the ones I want. My goal is to reduce the search time to an acceptable level such that these searches will not timeout and will not take forever in a web application environment.
Is there a way to have a query search for a specific batch of rows within a valid recordset? Grabbing the first batch is easy - set rowcount 50 will only process the first 50 rows. BUT, now I want to be able to grab the NEXT 50 rows.
Any ideas?
-Greg
I am fairly new to SQL programming, but I have a fairly decent amount of knowledge about the basics. What I am trying to do is perform a search on a very large table (millions of rows) with the possibility that the result could contain thousands of rows. I want my recordset to only return 50 rows. I want to be able to view the first 50 rows OR the second 50 rows OR the 100th 50 rows. Does that make sense? I know how to do this using a temp table, but the method I know still requires the time to return ALL the rows to the temp table and then grab the ones I want. My goal is to reduce the search time to an acceptable level such that these searches will not timeout and will not take forever in a web application environment.
Is there a way to have a query search for a specific batch of rows within a valid recordset? Grabbing the first batch is easy - set rowcount 50 will only process the first 50 rows. BUT, now I want to be able to grab the NEXT 50 rows.
Any ideas?
-Greg