Common Table Expressions are a great way to simplify complex derived table queries. If it makes sense to break out one derived table or subquery into a CTE, it can make sense to do multiple CTE’s. To use multiple CTE’s in a single query you just need to: Finish the first CTE Add a comma Declare the name and optional …

Multiple CTE’s in a single Query Read more »

In preparation for an upcoming SQL Saturday presentation I have created another report to add to the FREE SQL Server Health reports project. The new Index Statistics Report is the 8th report in the series, intended to give DBA’s and database developers access to the information they need to analyze the health of their database.   Here is a screen …

Index Statistics Report added to the FREE SQL Server Health Reports Read more »

In preparation for an upcoming SQL Saturday presentation I have created another report to add to the FREE SQL Server Health reports project. This report has been replaced with the Backup Report in the Database Health Project. The Backup Set Report has been added to the SQL Health Reports.  The Backup Set Report  is the 7th report to be added to the Database …

Backup Set Report added to FREE Server Health Reports Read more »

In preparation for a SQL Saturday presentation I have created another report to add to the FREE SQL Server Health reports project.   The Database Size Report has been added to the SQL Health Reports.  The Database Size Report  is the 6th report to be added to the Database Health Reports package. The Database Health reports package is a FREE …

Database Size report added to SQL Health Reports Read more »

I submitted another abstract for SQL Saturday titled TSQL Basics – SQL Server Join Types. Focusing on inner join, left outer join, right outer join, full outer join, cross join and self join. This is for the SQL Saturday in Vancouver BC sessions. That makes three sessions for Vancouver now. I still need to figure out the selection process to …

SQL Server Join Types – inner join, left outer join, right outer join, full outer join, cross join and self join Read more »

As part of my planning for the SQL Saturday Presentation in Vancouver I am creating an hour long presentation on Common Table Expressions. The easiest way to do a recursive query in SQL server is to use a recursive CTE (Common Table Expression). What is a Common Table Expression in SQL Server? Similar to the ease of a temporary table …

Recursive CTE’s Read more »

After creating and deploying the duplicate indexes report earlier today I discovered that although the report did exactly what it says, it didn’t do what I needed. The earlier  duplicate indexes report only found indexes that were an exact match on the columns.  And that is useful to track down, it didn’t point out indexes that were similar, but had additional columns. …

Free – Duplicate Indexes Report – Updated Read more »

After yesterdays Long Running Queries Report, I have decided to add one more SQL Server Health report. A duplicate indexes report has been added to the Server Health reports. With this report you can track down time waste associated with duplicate indexes. Here is a sample of the new free report. This is part of my growing collection of free SSRS reports to …

Free – New Duplicate Indexes Report added Read more »