Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 

Archives: July 2010

Poor Little Misunderstood Views

Some people love ‘em, some people hate ‘em. But, one thing I have found to be nearly universal is that most people misunderstand how Views are used in SQL Server.

The Backdrop

A View is merely a pre-defined query that can be treated in many ways as a table. This… Read more

8 comments, 4,758 reads

Posted in SQL Coach on 29 July 2010

Implicit Data Conversion: The "HHidden" Bottleneck

Have you ever written a query that just seems to take forever? You have looked it over time and time again, and it seems to be perfect! It’s straightforward, has an appropriate index, and still takes 5, 10, 15 seconds… or even minutes?.

A common cause in this scenario is… Read more

0 comments, 554 reads

Posted in SQL Coach on 13 July 2010

WHERE to begin

Many people, once they start getting comfortable writing SQL, begin asking the same questions. One such common question is “Does the order I put stuff in the WHERE clause make a difference?” This question usually means different things to different people, so let’s dig in a bit.

There are often… Read more

0 comments, 548 reads

Posted in SQL Coach on 7 July 2010

Indexes are best utilized in WHERE, not JOIN

A pervasive oversight in database indexing by newer database users is relying solely on indexes used for joining tables together (i.e. foreign key indexes.) For example, say you have a Puppies table and a Kid table. Most likely, there is a Kid_ID column in the Puppies table pointing back to… Read more

1 comments, 875 reads

Posted in SQL Coach on 1 July 2010