concept sense in category sql

appears as: sense, sense
SQL Server MVP Deep Dives Vol. 2

This is an excerpt from Manning's book SQL Server MVP Deep Dives Vol. 2.

Once generated and communicated back into the real world, artificial keys can move from a starting position of meaningless to a position of meaningful by virtue of being used and hence become semi-natural. For example, it’s easier for the warehouse manager to communicate specific products to employees using a short integer number than to use a barcode or a combination of five different properties that constitute the natural key. These arbitrary numbers eventually make sense to this cloistered group of people, regardless of whether they have any meaning to the people in the warehouse next door. And on their lunch breaks, they canrelax with no confusion at all over a nice hot cup of 593482.

Even great applications can experience performance problems. The ability to troubleshoot and resolve these issues when they occur is critical. Monitoring Windows Performance Monitor counters is one of the first things you should do when performance problems arise. But which ones should you look at? There are hundreds of counters to potentially capture, and making sense of the information once captured is often difficult and time consuming.

SQL Server DMVs in Action: Better Queries with Dynamic Management Views

This is an excerpt from Manning's book SQL Server DMVs in Action: Better Queries with Dynamic Management Views.

For the results to make sense, the number of rows associated with the TOP command given with the sp_MSForEachDB command must match the number used for the final retrieval from the temporary table.

As part of your normal monitoring, it makes sense to ensure that the runtime duration of your queries doesn’t deviate significantly from the expected norm. Identifying slower-than-normal queries will allow you to target your efforts and correct any performance problems in a timely manner.

SQL Server MVP Deep Dives

This is an excerpt from Manning's book SQL Server MVP Deep Dives.

In specific cases it’s good to denormalize even in an OLTP database. For example, within an inventory system, it might make sense to precalculate the inventory transactions and store the quantity on hand for parts per location. Read/write ratios should be carefully considered, and you should never assume that denormalization is required without testing it both ways under load—properly normalized and denormalized. (And consider asking an MVP in the newsgroups if there is a better way to do things—helping people is what the MVP program is all about.)

Although establishing a connection is fairly cheap, it’s not free, so when designing highly scalable applications it makes sense to minimize the total number of times an application opens and closes connections, thereby getting the most out of each open/close cycle. This is especially true for ASP or Web Service applications that have to service dozens to thousands of connections a minute.

Because an ASP/ASP.NET/Web Service application cannot (or should not) attempt to maintain a globally referenced Connection object, applications are designed around a just-in-time connection strategy. This usually means acquiring a connection just before it’s needed and releasing the connection back to the connection pool right after the results are captured by the client. I discuss the connection pool a little later (see “Connection management” later in this chapter). I think this makes sense to an extent. If you know that your application plans to make several queries in quick succession, some might suggest a broader-scope connection paradigm that holds the connection until all of these operations are complete. This approach comes with an element of risk. One of the more common failure modes for ASP-type applications is leaking connections—that is, when connections are acquired (by the Connection.Open method) but not released (with the Connection.Close method). Because the .NET Framework’s garbage collector (GC) does not run that often,[2] orphaned connection objects (that have not been released) might languish in the object garbage heap for minutes to hours. Because of this, any connection strategy must ensure that any connection that’s acquired (opened) is release (closed).