Hello, i am using SQL Server 2012, recently i was facing the performance issue with one of the report in application. i got a question: is this related to Database or is this due to application. how can i make sure the issue is with application or database, can any one help in sharing the view how we can find this.
You have to capture metrics on the SQL Server instance to understand the behavior of that instance. You need to know the wait statistics, memory, cpu, I/O of the server, focusing on the waits and queues. The best tool for gathering these metrics is Windows Performance Monitor, a built-in tool for your OS. You also have to gather metrics about the queries run by the report to understand how it's behaving, how much cpu, I/O, and memory it uses, what it's wait statistics are. You do this using extended events in 2012, again, a free tool built into SQL Server. You'll also want to capture the execution plan for the query to understand, based on how it's currently written, how is the query optimizer choosing to define the execution of the query. With all this information, you can understand how SQL Server is behaving. If this is your first time doing performance tuning, might I suggest getting a copy of my book, [SQL Server Query Performance Tuning]. It goes over all of the above and then tells you how to figure out what's wrong with your query and fix it. You'll need to do the same type of work from the application side of things. I'm not an expert there, but I can suggest you look at the tool [ANTS Performance Profiler]. It will tell you exactly where your code is running slowly. Further, if your database is the bottleneck, it will help you identify which query is the problem and it will even capture the execution plan for you. DISCLAIMER: I work for Redgate. :