Thursday, January 19, 2012

SQL Server Resources


Improving SQL Server Performance 

This is just one chapter an online book called Improving .NET Application Performance and Scalability.


Locking and Row Versioning

Pay special attention to the links on the left navigation for information on these topics


The Curse and Blessing of Dynamic SQL

Very in-depth article on issues associated with Dynamic SQL including escaping quotes.


Arrays and Lists in SQL Server 2008

Very in-depth article on how to work with Arrays and Lists (or the lack thereof). It gives solutions for the different versions of SQL Server.


Using a Table Valued Function in a JOIN

Another solution for parsing delimited string. See the above link Arrays and Lists in SQL Server 2008 for more solutions.


Reorganizing and Rebuilding Indexes


SQL Server script to rebuild all indexes for all tables and all databases

This is a very handy script to rebuild all your indexes for a list of databases. I call this after a I import a bunch of data into tables. I also call sp_updatestats AFTER to update stats on the non-indexed columns. Or force all stats on individual tables (including indexes, columns, etc) to be updated by using UPDATE STATISTICS dbo.MyTableHere WITH FULLSCAN. Since the only time data changes when I import it, I have turned off automatic stats update at the database level so that the query optimizer doesn’t have to make sure the stats are up to date. BTW, rebuilding indexes and then calling sp_updatestats didn’t always update all the stats if it thought they didn’t need to be updated. I prefer to force the update after the import.


SQL Server 2008 R2 Books Online (from Microsoft)

This is an excellent resource for lots of topics on SQL Server.


Optimizing Bulk Import Performance

No comments: