Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Do you check connection on every call to SQL?
Message
De
05/03/2012 21:05:31
 
 
À
05/03/2012 20:33:33
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
SQL Server:
SQL Server 2008
Divers
Thread ID:
01537347
Message ID:
01537354
Vues:
45
>You pretty much have to do it that way in a web app because it's stateless.

Yes, but I had an initial design where the connection was created at the oApp object and shared on every oApp.oProcess object (the one processing each hit), but this was not good (safe) as so expressed by a few experts on the topic here on the Universal Thread. So, it turned out that a connection is then created for each hit and cannot conflict with another. Initially, I created that design thinking that it would make it faster and avoid crowding the queue towards the backend. But, it turned out the other approach, the one which creates a connection for each hit, is safer, as fast and cleaner.

Now, after having taking another look at it. I see that every hit against a backend is enclosed in a Using / End Using syntax. So, basically, it's not a connection per hit but per database request. So, if I take a look at a specific Web site where I can see the stats, this means about five millions SQL Server connections per day. This includes all platforms and for all kinds of hits such as SQLExec(), insert, delete and update. Welcome the connection pooling because otherwise it wouldn't be as fast.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform