. . Hong Kong Business Software Company
Expert in web-based solutions
Software House in Hong Kong

Microsoft Certified Solution Developer

 

Chief Architect's Blog on software development

20 Aug 2011
SQL Query Comparison
Last month, I attended a SQL Server seminar.  The speaker talked about database tuning and recommended several tools, including Performance Monitor, SQL Server Profiler, Database Engine Tuning Advisor, etc.  All these tools may help Database Administrator to identify bottleneck of the database or identify slow-running sql query. 

As a result,  programmer may need to re-write the identified slow-running sql query. After that, the programmer may want to know whether the performance of the re-written query is really improved or not.  Does the above tools helpful at non-production stage?  The answer is "NO". 

In fact, you can use a simple feature of SQL Server Management Studio to do query performance comparison.  Open a new Query Window and add the old query and newly written query in the same query window.   After execute the two queries as a batch, right-click the screen and select "Display Estimated Execution Plan".  You can see the cost of each query relative to the batch.  The query that has higher cost is a lower performance query (see the image below).



more topics...  

Home | Products | Services | FAQ | Chinese version | Contact Us
© 2008 Bisware Technology Limited. All Rights Reserved.