SQL Server Performance

Create Index on a temp table

Discussion in 'SQL Server 2005 Performance Tuning for DBAs' started by jstevenson, Mar 7, 2010.

  1. jstevenson New Member

    I have a table that get's built on a nightly basis and it is utilized for reporting purpose. It appears some of the reports' T-SQL statements are joined with the temp table and production table in order to retain data. For example, the temp table is called Stval and contain a column called CustID. The production table is called ValMet and contains CustID column. Therefore, T-SQL statement are being join by StVal and ValMet.
    My question is, If I were to create an index on the temp table, would I expect performance gain?
  2. Adriaan New Member

    Normally, yes.
    You might consider adding the index on your temp table only after inserting data into it, in case the insert takes too much time with the index in place.

Share This Page