Browsing the blog archives for September, 2009

Table Row Counts

The easiest way to count the number of rows in a table, from the user perspective, is to use the simple COUNT(*) operator.  A more efficient method to count the number of records in a table is to use SQL Server’s system tables. Let’s start out with the naive approach and see how it performs. […]

Searching for Column Names

How many times a day do you need to find out where a piece of data is stored in a table but don’t have a clue where to look?  If you’ve been working on the same database for the past three years you probably know where everything is. But if you work on multiple schemas, […]


Using Database Snapshots To Test Loads

When testing data warehouse ETL routines it’s often necessary to be able to reload the same data several times before you get the code dialed in and ready for production work.  One way to be able to do this is to simply TRUNCATE the target table, assuming there are no foreign keys on it.  If […]