SQL Performance

If your SQL performance is poor and your query statement is slow then what are the different ways to improve the performance of SQL statement ? How you can boost up the performance?

Easy way to diagnose SQL Server “sp_Who2” TIP #84

  Why the SQL Server is running slow ? What are the processes running currently on SQL SERVER instance ? Many other like the above which might help us to understand our current SQL Server instance health can be answered by a simple command “sp_who2”. “sp_Who2”  is an Undocumented command. You can utilize this command …

How to configure memory in SQL SERVER ? TIP#83

  One of the good sentence I remember “When someone has teeth he/she is not having nuts and when someone has nuts he/she not having teeth”. Just joke a part. You understand what I mean to say here. If you have the resources then utilize it. One of the most most important aspect in performance …

How to replace a specific string from a large string with Write feature ? TIP #72

  This is very interesting feature and I recently come to know this awesome feature. Lets understand this by an example below Suppose we have a student table with following structure  as shown in below image   We have a detail column with VARCHAR(MAX) . Now as it is VARCHAR(MAX) column it may content a …

How easy it is to check which statements consuming most of the CPU & RAM–TIP #68

  Problem:-  One of the most important question comes in our mind what is the cause of slow  SQL SERVER. We always struggle with following questions Which is highly CPU consuming query ? Which is highly RAM consuming query ? Who is blocking the transaction ? and many more other performance dragging questions. Believe me …

What is TVP (Table Value Parameter) & How to use it ? TIP #57

  This is one of the interesting feature which I like most. Instead of passing values from collection one by one pass entire collection to stored procedure as a table value parameter. I know above statement is not digestive enough so lets understand this by an example. Suppose , I have a table tblStudent with …

Boost query performance with avoiding basic mistake with Select statement. Performance Tip – #42

  Problem:- My query is slow what are the basic things I can do to get good performance without going for indexes. Solution:- May be this solution help you which I am describing here or it is possible you already aware of it.   (a) Avoid function in column :-The most basic tip is avoid …

Performance tips :- Different reports to analyze your SQL Server who is making it slow. TIP#31

Dear Friends, One of the really important part of any database is performance. Everyone complaining your system is slow , your database performance is slow but why it is slow ? Most of the time we are not aware what is the source?  Which SQL statement creating problem? Lets understand this thing why our SQL …

Performance tips – Check no of logical & Physical reads TIP #18

Sometimes, we need to understand what exactly going on with particular statement, stored procedure why it is slow? To check performance of statement what exactly going on we also interested how many logical reads, physical reads a particular statement taking. To achieve this we need to write SET STATISTICS IO ON For exampleGOSET STATISTICS IO …