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.

 All Forums
 SQL Server 2005 Forums
 Express Edition and Compact Edition (2005)
 How many records from DB to frontend?

Author  Topic 

dkperez
Starting Member

5 Posts

Posted - 2008-08-20 : 09:05:42
Traffic question... I'm being told by the folks that built the web page that the front-end is only getting the records it needs, and I'm curious how this is happening...

Situation is that several hundred records are retrieved from the database, but they are to be displayed 20 per screen on the front end. (IGNORE the idea of retrieving them 20 at a time from the database...)

If I retrieve 400 records from a database table in a subroutine called from the front-end code, do the records get pushed across the network? Does the front-end somehow communicate with the database to only pull or accept a subset of the records? If the user selected page 19 to view, would the front-end somehow only grab records 361-380 or would at least 380 records get sent to the front end for processing?

I'm being told by the folks that built the web page that the front-end is only getting the records it needs, and I'm curious how this is happening...

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2008-08-20 : 10:12:15
doing paging on the client means that on the first call you get all 400 rows of data, the client caches them and does paging on the cached data.
so no, there's no "smart" communication between the client and the server for this.

_______________________________________________
Causing trouble since 1980
Blog: http://weblogs.sqlteam.com/mladenp
Speed up SSMS development: www.ssmstoolspack.com <- version 1.0 out!
Go to Top of Page

dkperez
Starting Member

5 Posts

Posted - 2008-08-20 : 11:37:46
Thanks for the quick reply.....

I've rummaged around and found out they're using an ASP ADO recordset. Then to get the page of data they
do a "move" to the starting point and read from there.....

SO, the user's browser isn't getting hit with all the records, but the whole recordset is getting dragged out
of the database and shoved over to where the interface software is runnig, correct?

SO, the question is, is it SIGNIFICANTLY faster and more tolerant of multiple users to have the database
retrieve only what's needed or to do this as it's currently being done? I'm not much concerned when there's
just one user working, but what happens when 1000 users are pulling 300 or 500 thousands of records?
Go to Top of Page
   

- Advertisement -