Archive for 'TSQL Optimization'
Understanding SQL Server Statistics
Donabel Santos (twitter (@sqlbelle) | blog) – April 25, 2011 “Statistics provides tools that you need in order to react intelligently to information you hear or read” – David Lane, 2003 If there’s an upcoming election and you are running for office and getting ready to go from town to town city to city with [...]
Posted: April 25th, 2011 under Indexing, TSQL Optimization.
Comments: 3
Tips for Optimizing XML in SQL Server
Donabel Santos (twitter (@sqlbelle) | blog) – March 29, 2011 I’ve worked on a project that used XML heavily inside SQL Server. We really utilized SQL Server’s XML support almost to the full extent, but with some repercussions. As we did our load testing, performance did degrade and we had to step back and adjust [...]
Posted: March 29th, 2011 under Indexing, TSQL Optimization.
Comments: 5
Comparing Simple Efficiencies: T-SQL UDF vs SQCLR UDF for Splitting Strings
Donabel Santos (twitter (@sqlbelle) | blog) – February 21, 2011 Recap of T-SQL vs SQLCLR (pseudo) Debate There have been numerous posts about benefits of using T-SQL vs SQLCLR, and vice versa. And we all know the mantra – T-SQL for data access, SQLCLR for anything that is computationally intense tasks. SQL Server is a [...]
Posted: February 23rd, 2011 under TSQL Optimization.
Tags: SQLCLR, TSQL, UDF
Comments: 1
Replace the poorly performing SUBSTRING function in SQL Server with the LIKE statement
Brett Hawton – 8 December 2010 In a previous article I had shown that embedding an indexed column in a function prevented SQL server from performing an efficient index seek and instead resulted in a far slower index scan. I had shown many techniques to extricate the column out of the function so as to [...]
Posted: December 8th, 2010 under TSQL Optimization.
Tags: query plans, TSQL
Comments: 1
Are you sure you can’t use NOLOCK to speed up SQL Server?
Brett Hawton – 22 November 2010 Performance tests comparing SQL Server queries run with the NOLOCK optimizer hint against the same queries run without the hint regularly show performance improvements of around 15%. Here is a paper on just such a performance test showing the improvement http://www.sqlservercentral.com/articles/Performance+Tuning/2764/ . Perhaps even more importantly, the fact that [...]
Posted: November 22nd, 2010 under TSQL Optimization.
Tags: locking, TSQL
Comments: 1
Performance comparison between temp tables and table variables in SQL Server
Brett Hawton – 25 October 2010 The table variable was introduced way back in SQL Server 2000. However many older “legacy” applications using TSQL don’t make use of it and instead use temp tables. Indeed even a number of more recently written applications I reviewed still continued to use temp tables. This article attempts to [...]
Posted: October 25th, 2010 under TSQL Optimization, Uncategorized.
Tags: tables, TempDB, TSQL
Comments: 4
Does removing expressions from within standard aggregation functions always help SQL Server performance?
Brett Hawton – 17 October 2010 In a previous article I had shown how to quantify and rank your “heaviest” queries according to the overall load they placed on your SQL Server system. That discussion had shown that at most sites it’s often NOT the infrequent long-running queries which are placing the greatest load on [...]
Posted: October 18th, 2010 under TSQL Optimization.
Tags: DBCC, query plans, TSQL
Comments: 3
