Logo 
Search:

Asp.net Answers

Ask Question   UnAnswered
Home » Forum » Asp.net       RSS Feeds
  Question Asked By: Loretta Carpenter   on Aug 19 In Asp.net Category.

  
Question Answered By: Mercedes Andrews   on Aug 19

This was not the best approach from a Round-Robin / Connection Pooling standpoint.
http://www.learnasp.com/learn/dbpooling.asp
http://www.learnasp.com/advice/roundrobin.asp
Scalability is higher if you close early and open late.

in ADO.Net should i open the connection & keep it open whole through the application or open it & close it only when required. which is the most efficient way

Close it because Connection Polling still happens same way under the covers. ASP.net makes it almost impossible to get this wrong because the only "connected" data  object (the DataReader) forbids using the SAME connection for mutiple open datareaders. In fact doing it wrong is really difficult in ASP.net and really easy to do it wrong in Classic ASP.

The most efficient thing in .net is to master caching - Page Caching, Fragment Caching, Cache objects and dependencies.
www.learnasp.com/freebook/learn/caching.aspx

Some sample caching is @
www.learnasp.com/freebook/learn/cachepage.aspx
www.learnasp.com/.../...archeruc_cached_fixed.aspx
But Utility Belt supports the easiest kind of caching ala:
www.learnasp.com/.../...belt_cached_sqlclient.aspx

I am working on some upadates to those caching pages and some more caching examples keep an eye on:
http://www.learnasp.com/freebook/learn/index.aspx
specifically the
Speed / Optimization
section.

Share: 

 

This Question has 5 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on GetRows of ADO in ADO.Net Or get search suggestion and latest updates.


Tagged: