SQL SERVER – Creating Temporary and Global Temporary Stored Procedures

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.

Read More

SQL SERVER – Improve Index Rebuild Performance by Enabling Sort In TempDB

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. 

Read More

SQL SERVER – How to Create A Global Temporary Table?

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?

Read More
Exit mobile version