SQL Server – Formatted Date and Alias Name in ORDER BY Clause

CONVERT function can be used to change the format of DATE to various formats like MM/dd/yyy, dd/MM/yyy, yyy/MM/dd, etc. But have you ever noticed that this will produce resultset with a different order if the alias name is used in ORDER BY Clause? Well, I just learned about the formatted date from my recent consulting engagement Comprehensive Database Performance Health Check.

Read More

Video – Database Performance Analyzer – Table Tuning Advisors

Earlier this week, I blogged about Database Performance Analyzer – Table Tuning Advisors and I received quite a lots of request to elaborate more on the topic of Table Tuning Advisors. In the response to the requests, I have decided to create a video which explains how Table Tuning Advisors of Database Performance Analyzer works. To make it more realistic, I have also included a real-world problem one of my customer whom I have recently helped to fix their SQL Server Performance during Comprehensive Database Performance Health Check. 

Read More

SQL SERVER – Selecting Random n Rows from a Table

Every day I spend a good amount of time with different customers helping them with SQL Server Performance Tuning issues. Today we will discuss the question asked by a developer at the organization where I was engaged in Comprehensive Database Performance Health Check. The developers wanted to know if there is any way he can randomly select n rows from a table.

Read More