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)

No comments:

Post a Comment

Comments are very welcome but are moderated to prevent spam.

If I helped you out today, you can buy me a beer below. Cheers!