Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / February 2008

Tip: Looking for answers? Try searching our database.

Question regarding performance when binding multiple controls to     database

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
gnewsgroup - 11 Feb 2008 19:45 GMT
Suppose that I have 5 controls on a single aspx page that need to be
bound to a database.  Each control will have different content.

(1) I can create a single stored procedure that returns 5 tables all
at once. Then in my code-behind, I only need to make 1 trip to the
database to get the data, parse the data and bind them to each of the
5 controls.

(2) I can also create 5 stored procedures, one for each control.  And
then in my code-behind, I make 5 separate trips to the database to get
the data, once for one control only.

Should we do (1) whenever possible?  I guess I am sorta sensitive/
allergic to database performance issue now.

Thanks.
bruce barker - 11 Feb 2008 20:49 GMT
or you can call all five procs in one batch.

one trip is better, you just get mulitiple result sets back, if the batch
calls mltiple (or the sp calls multiple).

-- bruce (sqlwork.com)

> Suppose that I have 5 controls on a single aspx page that need to be
> bound to a database.  Each control will have different content.
[quoted text clipped - 12 lines]
>
> Thanks.
gnewsgroup - 12 Feb 2008 01:23 GMT
On Feb 11, 3:49 pm, bruce barker
<brucebar...@discussions.microsoft.com> wrote:
> or you can call all five procs in one batch.
>
> one trip is better, you just get mulitiple result sets back, if the batch
> calls mltiple (or the sp calls multiple).
>
> -- bruce (sqlwork.com)

OK, to call all five procs in one batch, we need to create another
stored procedure that calls these 5 stored procedures, right? Please
kindly let me know, I have always been wondering what people mean by
"one batch".

Thanks a lot!

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.