Click here to monitor SSC

Author Profile

Dwain Camps

Dwain Camps has been a project manager for many years. Because performance of applications can be a critical success factor for projects, he has been evangelizing on the need to develop highly performing SQL. By mentoring and authoring articles on SQL, he hopes to train a future generation of software engineers on the right and wrong ways to deliver SQL code. He also has a special interest in developing solutions to complex, data intensive problems using high performance SQL because the declarative nature of SQL allows development of algorithmically unique solutions that procedural languages may not be capable of.

High Performance Relational Division in SQL Server

Relational division is used in SQL to select rows that conform to a number of different criteria. It is a neglected but effective technique for a number of tasks. Although the SQL can appear daunting and complex, it can perform very well if you reduce the rows as much as possible before applying the final logic. Dwain Camps explains how, and shows the performance gains. Read more...

Calculating Gaps Between Overlapping Time Intervals in SQL

There are a number of real-life reporting tasks in SQL that require a 'gaps and islands' analysis. There are a number of techniques around that work, but finding ones that scale well makes for a tougher, but interesting, challenge. Read more...

The Performance of the T-SQL Window Functions

Window Functions in SQL greatly simplify a whole range of financial and statistical aggregations on sets of data. Because there is less SQL on the page, it is easy to assume that the performance is better too: but is it? Dwain gets out the test harness to investigate. Read more...

Calculating the Median Value within a Partitioned Set Using T-SQL

It is ironic that one of the most essential of statistical aggregations, the median, has been so difficult in the past to calculate efficiently in SQL. Although the recent window functions provide the solution, there isn't an obviously superior algorithm performance-wise, particularly when working across partitioned sets. Dwain Camps sets the candidates to work and identifies the winners and losers. Read more...

Fundamentals of Vendor Management

Creating and maintaining mutually beneficial relationships with external vendors is one of the pillars of good project management. Dwain Camps goes through what to expect and allow in your client-vendor relationship during the various stages of a given project to ensure its success and secure that all important win-win outcome. Read more...

Calculating Values within a Rolling Window in Transact SQL

Before the SQL Window functions were implemented, it was tricky to calculate rolling totals or moving averages efficiently in SQL Server. There are now a number of techniques, but which has the best performance? Dwain Camps gets out the metaphorical stopwatch. Read more...

The Proposals Conundrum

When you work for a small software development (or any services) company, one of the major challenges is to make sure that you expend your limited resources on opportunities that are economically sound. You may be approached by companies that have heard about you and think they might want to do business with you, but do these leads really represent opportunities? How much of your time should be spent finding out? Dwain Camps offers some guidance. Read more...

Condensing a Delimited List of Integers in SQL Server

In real-world applications, it often makes sense to show denormalized data such as delimited lists within the application's user interface. Dwain Camps shows why, and how, the distribution business stores information about 'islands' in sequences in order to track the status of the shipping of a consignment. It makes a great SQL puzzle Read more...

The SQL of Gaps and Islands in Sequences

Some SQL problems are intriguing because, just when good methods emerge and are accepted, other alternative solutions are discovered. The fun of exploring problems such as 'Gaps and Islands' is all the greater when we have a thorough test-harness to try out the alternative solutions. Read more...

How to Avoid Software Projects Failing

Although it is necessary to deliver a software project on budget, to schedule, to the right quality, it isn't, by itself, sufficient to ensure success. It has to be be what all the participants expect and want. To achieve all this requires a balancing act, with tradeoffs and compromises, but it is great when you get it right. Dwain gives advice from hard-won experience. Read more...

A SQL-Based Universal Currency Formatter

SQL Server isn't usually the best place to format dates or currency as strings. It can be a complex task to conform correctly with national and cultural conventions. Just occasionally, though, you need to do it. This is easy in SQL Server 2012, but if you aren't using that, what do you do? Read more...

Why Join

Over 400,000 Microsoft professionals subscribe to the Simple-Talk technical journal. Join today, it's fast, simple, free and secure.