Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Strange Query Optimiser information

Status
Not open for further replies.

litenin

Programmer
Oct 10, 2002
6
GB
Hello,

We have a SQL Server 2000 Instance with two database which are exactly the same, one is a restored backup of the other. One of the tables has about 20000000 rows in it. When we run a query which does a count grouping by one of the indexed columns the restored database uses an index and returns the results in about 12 seconds. The original database chooses not use the index and goes for a full scan and takes about 90 seconds. If we force the original database to use the index it only takes 12 seconds. I've tried running update stats and reindex the table but it's made no difference. What gives?

Dave
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top