Slow query performance after upgrading from SQL2000
We are having query performance issues with our data warehouse server after upgrading from SQL2000 to SQL2008R2.
Our problem is that *some* queries which ran in 5 seconds in SQL2000 now take 11 hours in SQL2008R2.
Worth noting that we get the same problem in SQL2005.
The queries which are stalling usually involve subselects. Some of those queries can be rewritten to remove the subselect but other queries are**dynamically** generated by an application which can not be changed.
We have tried altering the following server settings:
- Max worker thread (0 or 256)
- Degree of parallelism (0 , 1 or 4)
- Max memory (Reserve 1GB memory for system)
- Cost threshold (for parallelism) 1,5 or 20
Some of the other things We have tried:
- Adding new indexes
- Update statistics
- Rebuilt all indexes
- Migrating original data into new tables
Environment
-----------
SQL2000 and SQL2005 instances: 4CPU, 4GB RAM, Windows Server 2000 SP4
SQL2008R2: 4 vitual CPU cores, 6GB RAM, Windows Server 2008R2
We are having query performance issues with our data warehouse server after upgrading from SQL2000 to SQL2008R2.
Our problem is that *some* queries which ran in 5 seconds in SQL2000 now take 11 hours in SQL2008R2.
Worth noting that we get the same problem in SQL2005.
The queries which are stalling usually involve subselects. Some of those queries can be rewritten to remove the subselect but other queries are**dynamically** generated by an application which can not be changed.
We have tried altering the following server settings:
- Max worker thread (0 or 256)
- Degree of parallelism (0 , 1 or 4)
- Max memory (Reserve 1GB memory for system)
- Cost threshold (for parallelism) 1,5 or 20
Some of the other things We have tried:
- Adding new indexes
- Update statistics
- Rebuilt all indexes
- Migrating original data into new tables
Environment
-----------
SQL2000 and SQL2005 instances: 4CPU, 4GB RAM, Windows Server 2000 SP4
SQL2008R2: 4 vitual CPU cores, 6GB RAM, Windows Server 2008R2