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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Wrong statistics on indexes

Status
Not open for further replies.

NilsBevaart

Programmer
Apr 14, 2003
53
NL
My application, connected to a SQL2000 database returns time-outs. On analysis of the query's, I found that the execution plan is far from optimal. The estimated rowcount was 10 and the actual rowcount was 15000.
My auto-update-statistics option is on. I found that the last update of the statistics was at the time I started a manual index defragmantation.

I manualy updated my statistics. This helped in determining a better plan (using 2 indexes), but still my estimated rowcount is far off. The estimated rowcount is 500 instead of the 15000.
I updated the statistics for this index again, using a fullscan, but that still doesn't help.

How can this happen? What can I do to solve the problem for now, and prevent this from happening again?

Nils Bevaart
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top