• also, because of differences in the SQL engine's optimizer between versions, if you upgrade from 2005 to 2008R2 like you said, at a minimum you need to updating statistics, and i'd consider rebuilding the indexes , as that is a critical piece that must be part of your upgrade process.

    you can search and there's lots of posts stating "new server is slower than old one", and that is often a root cause.

    DECLARE @Exec VARCHAR(MAX)

    SELECT @Exec = ''

    SELECT @Exec = 'UPDATE STATISTICS ' + QUOTENAME(schema_name(schema_id))+ '.' + quotename(name) + ' WITH FULLSCAN ; ' + CHAR(13) + CHAR(10) + @Exec FROM sys.tables ORDER BY name DESC

    PRINT LEN(@Exec)

    PRINT @Exec

    EXEC(@Exec)

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!