Can you please share how you resolved the below issue you posted on Nov.24,2008. I am exactly having same problem but this is from sql 2000 to sql 2008.
-------------------------
Fra posted on Monday, November 24, 2008 3:05 PM
We migrated a large database (more than 50GB) from SQL 2000 to SQL 2005 using
backup/restore method. After restore, we tested a query that takes 20-30
seconds in SQL 2000 whereas in SQL 2005 it takes forever. I have run DBCC
DBREINDEX, DBCC UPDATEUSAGE (0) & sp_updatestats on the database on SQL 2005
but still no improvement. On checking the Execution Plan, it is using
Clustered Index Seek on SQL 2000 whereas it is using Clustered Index Scan on
SQL 2005. It is SQL 2005 64-bit server with 2 quad CPU and 16GB memory. Any
suggestion would be appreciated.
Fra wrote:
Query running slow in SQL 2005 after migrating from SQL 2000
24-Nov-08
We migrated a large database (more than 50GB) from SQL 2000 to SQL 2005 using
backup/restore method. After restore, we tested a query that takes 20-30
seconds in SQL 2000 whereas in SQL 2005 it takes forever. I have run DBCC
DBREINDEX, DBCC UPDATEUSAGE (0) & sp_updatestats on the database on SQL 2005
but still no improvement. On checking the Execution Plan, it is using
Clustered Index Seek on SQL 2000 whereas it is using Clustered Index Scan on
SQL 2005. It is SQL 2005 64-bit server with 2 quad CPU and 16GB memory. Any
suggestion would be appreciated.
Previous Posts In This Thread:
On Monday, November 24, 2008 3:05 PM
Fra wrote:
Query running slow in SQL 2005 after migrating from SQL 2000
We migrated a large database (more than 50GB) from SQL 2000 to SQL 2005 using
backup/restore method. After restore, we tested a query that takes 20-30
seconds in SQL 2000 whereas in SQL 2005 it takes forever. I have run DBCC
DBREINDEX, DBCC UPDATEUSAGE (0) & sp_updatestats on the database on SQL 2005
but still no improvement. On checking the Execution Plan, it is using
Clustered Index Seek on SQL 2000 whereas it is using Clustered Index Scan on
SQL 2005. It is SQL 2005 64-bit server with 2 quad CPU and 16GB memory. Any
suggestion would be appreciated.
On Monday, November 24, 2008 5:47 PM
Plamen Ratchev wrote:
If the query still runs slows after updating statistics, and there is no
If the query still runs slows after updating statistics, and there is no
chance you have a bad plan because of parameter sniffing, then you may
want to look at changing the query.
You can post the query here and someone may have suggestions on how to
improve.
Also, you can run the the query through the Database Tuning Advisor to
see the recommendations. In addition, if you get a parallel execution
plan you can test running on a single processor using the MAXDOP query
hint.
Here is an article with some interesting points:
http://rentacoder.com/CS/blogs/real_life_it/archive/2006/04/28/477.aspx
--
Plamen Ratchev
http://www.SQLStudio.com
On Monday, November 24, 2008 6:03 PM
Jonathan Kehayias wrote:
The other thing you can do is create a plan guide.
The other thing you can do is create a plan guide. I am not an expert on
this, and unfortunately I missed Kalen's session on it at PASS, but she
would be best to explain it. You can also look at:
http://www.microsoft.com/technet/prodtechnol/sql/2005/frcqupln.mspx
--
Jonathan Kehayias
SQL Server MVP
http://jmkehayias.blogspot.com
http://www.sqlclr.net
"Plamen Ratchev" wrote in message
Submitted via EggHeadCafe - Software Developer Portal of Choice
Adding WCF Service References
http://www.eggheadcafe.com/tutorials/aspnet/a1647f10-9aa4-4b0c-bbd9-df...a9fab8e >> Stay informed about: Query running slow in SQL 2005 after migrating from SQL 2000