ASP.NET Performance Tips
page 2 of 19
by Adiseshu Dasari
Feedback
Average Rating: 
Views (Total / Last 10 Days): 76765/ 276

Return Multiple Recordset

Review your database code to see if you have requested the database more than once. (Best example is if you are loading the master data from a different table to populate list boxes.) Each of those round-trips decreases the number of requests per second your application can serve. By returning multiple resultsets in a single database request, you can cut the total time spent communicating with the database. You will be making your system more scalable too; as you will cut down on the work the database server is doing managing requests.

While you can return multiple resultsets using dynamic SQL, it is preferable to use stored procedures. It is arguable whether business logic should reside in a stored procedure.

Using a SqlCommand instance and its ExecuteReader method to populate strongly typed business classes, you can move the resultset pointer forward by calling NextResult.


View Entire Article

User Comments

No comments posted yet.

Product Spotlight
Product Spotlight 





Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2020 ASPAlliance.com  |  Page Processed at 2020-08-03 10:48:19 PM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search