28 May 2009

Indexing SQL Server 2005 Temporary Tables

Simple really - if you create a large temporary table in your sproc, you may need to index it to improve performance on queries you subsequently run on it, e.g.

CREATE CLUSTERED INDEX IX_blah ON #YourTempTable (YourPKCol)

22 May 2009

SQL Server performance and statistics

Queries started running slowly on your SQL Server? Maybe your db statistics need updating.

A quick and dirty way to do this for all tables in your DB is the sp_updatestats sproc.
If I helped you out today, you can buy me a beer below. Cheers!