Skip to Content
Professional SQL Server™ 2005 Programming
book

Professional SQL Server™ 2005 Programming

by Robert Vieira
December 2006
Beginner
912 pages
24h 44m
English
Wrox
Content preview from Professional SQL Server™ 2005 Programming

B.2. General Performance Considerations

In many places in this book, we talk about things you can to on the server side to help yoursystem perform well. Keep in mind, however, that there are a lot of places your system can have performance issues introduced — not just in your server-side components. The manner and frequency of your connections can play a significant roll in performance. Here are some key issues to think about.

B.2.1. Connection Management

The opening of a connection can be one of the most expensive parts of any query. Exactly howlong it takes will vary depending on a wide variety of issues, but, even in the best of scenarios, a connection can take several times as long to open as the actual execution will take for most simple queries.

So — how to manage this? Fortunately, utilizing some basics will eliminate most of the issue:

  • Utilize "connection pooling" if possible — Connection pooling is a concept that is built into most modern connectivity methods and is usually turned on by default. Under connection pooling, the underlying connectivity model you're using (ODBC, OLE-DB, SQL Native Client) "pools" the connections on your client. This means that when you close a connection in your code, the connection is not actually immediately closed to the server — instead, the connection is put into a pool for possible reuse. When another block of code (even from a different process on your client) makes a connection with the same connection properties (server, username, ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Professional Microsoft® SQL Server® 2008 Programming

Professional Microsoft® SQL Server® 2008 Programming

Rob Vieira, Mahsa Nakhjiri

Publisher Resources

ISBN: 9780764584343Purchase book