Fastest Updates in SQL Server

The project I’m working on at the moment requires me to achieve the fastest updates I can into a moderate sized SQL Server database table. My initial attempts were adequate for the testing I was doing on my development machine but when I came to do a more thorough test in a production like environment I found that the method I was employing wasn’t even close to fast enough. At that point I seriously considered just giving up, the difference between what I had and what I needed didn’t look like an “I’ll give it a tweak” type problem¬†it was a vast performance gulf that had to be crossed. The solution was to better understand both my application and SQL Server and here’s what I did.Continue reading

SQL Having

The having clause is used when filtering has to be performed on aggregate functions since the where clause can not be used in this situation. Since the having clause is often used in conjunction with the group by clause the examples on this page use the same data as was used in the group by article and follow on directly from that article.Continue reading

SQL Group By

The group by statement is generally used in conjunction with the various aggregate functions in order to produce results that are grouped by one or more columns. This is a very powerful way to report results for groups of results that share some common trait – in the example below the shared trait we are using is generally customer name.Continue reading