During recent Comprehensive Database Performance Health Check, I had a very interesting situation I encountered where we found a stored procedure which was a root cause of the slowness. What we needed to do is to change the code and test if our new stored procedure is better than previous stored procedure or not. One of the options was to create a new stored procedure by renaming the older stored procedure and keep on testing. However, there was a small risk if we forget to drop the newly created stored procedure there will be junk created in the database. Let us see how we can avoid this situation by creating temporary or global Temporary stored procedures.
Question: How to Shrink TempDB Without SQL Server Restart?
During recent Comprehensive Database Performance Health Check, the customer put forward a compelling request. They wanted to improve their index rebuild performance as their index rebuilding process is taking forever to complete. When they asked me this, I exactly knew what we needed to do for this customer. We ended up fixing the issue of index rebuild by enabling sort in TempDB.
Question: What is WorkTable in SQL Server?
In the last 11 years of blogging, I have never received a question which I have received yesterday. The question which I often receive is about how to add TempDB files in SQL Server but I have never received a question about how to remove a TempDB file.
Two days ago, I wrote an article SQL SERVER – How to Create Table Variable and Temporary Table? It was a very basic article for beginners. However, to my surprise, I have got tremendous response to that blog post and also got quite a lot of feedback about the it. Out of all these one feedback which stood out was that I did not include discussion about Global Temporary Table. I agree that when I was writing this blog post I did not think of this, but it is never too late to write about any topic. Let us see in this blog post how to create a global temporary table?
This is a very simple question and indeed many of us know about this one. However, if you are absolutely beginner, you will for sure need help with this one. Let us understand how we can create a table variable and temporary table in this simple tutorial.