SQL SERVER – Finding The Oldest Query Plan From Cache

Often people ask where do I come up with a new blog idea everyday. Well, answer is that I am not the one who comes up with new idea, it is all of you who inspire everyday with a new idea. Recently one of the healtch check client Comprehensive Database Performance Health Check asked me if there is anyway can see the oldest query plan from the cache for his server.

Read More

SQL SERVER – Get List of the Logical and Physical Name of the Files in the Entire Database

One of the most popular questions I often receive is why do I like to do consultation – my answer is very simple – it gives me an opportunity to learn continuously learn new things from my clients. Here is a script which I have built during my recent Comprehensive Database Performance Health Check. To perform one of the performance tuning tasks we needed a list of all the logical and physical names for the files for every single database on the SQL Server Instance. Here is the script which can list all the physical and logical name of the files along with their type as well.

Read More

SQL SERVER – The Older Way to Find Size of Index Using Deprecated sysindexes

Earlier this month, I wrote a blog post about How to Find Size of the Index for Tables? – Interview Question of the Week #198, in this I had explained the way to find the size of the index for the table. However, while I was writing the blog post, I was thinking about how I used to love sysindexes once upon a time. However, as now I focus on the new DMVs, I decided not to provide the script of the sysindexes.

Read More