When it comes to writing high-performance Web applications, there is a performance truism: if your application performs any cross-process communication (database, Web services, remote object invocation) it's a better use of your time to either optimize those communications or to remove them entirely before attempting to optimize other code within your application. Once the problem areas are identified, the next step should be to use SQL Server Profiler to inspect how the application uses database resources. Once that decision is made, it is usually a matter of doing some basic profiling of the application using Application Center Test and identifying where in the application performance is poor. The best approach, as always, is to analyze bottlenecks (hardware or software) before doing anything.īeing a developer, I prefer to sling some code first, before taking the hardware approach. If a bottleneck is in the software, fast performing hardware can queue requests faster, making the bottleneck worse. It should be noted, however, that performance problems can sometimes be worsened by adding new hardware before analyzing for bottlenecks. Most developers prefer to tune the code, but sometimes it actually can be more effective to just add new hardware. Typically most performance problems are addressed in one of two ways: by adding new hardware or by tuning the code that runs the application. How much time do you spend analyzing how your application uses its database resources? For developers, the most common answer is not very much. Understanding some of this complexity is important because, as you'll find, the database is often the bottleneck in your application and the more you know about the internals of SQL Server the more you can do to avoid those problems. Internally, SQL Server is an amazingly complex piece of software, but programming and using it is quite easy. Personally, if I could have worked on any other product team besides ASP.NET during my tenure at Microsoft, it would have been the SQL Server team. While these SQL-oriented tools are not something most ASP.NET developers are familiar with, I would strongly encourage you to add these to your tool belt. In this column, I'm going to discuss two other tools of the trade: SQL Server™ Profiler and SQL Server Query Analyzer. I covered the value of Application Center Test for measuring performance, which is quite critical because you can use those measurements to make improvements, set goals, and most importantly plan capacity and scale. Application Center Test is one of those tools you don't know you need until someone shows you how useful it really is. In my last column, I discussed Microsoft® Application Center Test and how it could be used to measure the performance of your Web application (see Extreme ASP.NET: Tools of the Trade: Application Center Test). Tools of the Trade: SQL Server Profiler and Query Analyzer
0 Comments
Leave a Reply. |