All Articles datetime

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
All Articles nrows-600x137

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
All Articles longrunning-fn-600x335

SQL SERVER – Query to Find the Longest Running Function – Function Elapsed Time

I love my job of SQL Server Performance Tuning and Optimization consultant as every single day I walk into the customer door (well, to be honest, it is actually virtual door of GoToMeeting), I face new challenges and learn new ways to tune SQL Server. In this blog post, we will discuss Query to Find the Longest Running Function.

Read More