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

Different Record Count in Enterprise manager

Status
Not open for further replies.

TorrediPisa

Programmer
Apr 15, 2004
67
IT
Good day to evryone.

I have found out the following problem using SQL Enterprise Manager:
When I double click on a Table of a database, and the Table Properties appears, the number of rows, which is indicated under the filegroup, in is one lower than the actual.
Infact I have a table with 50 records but there are indicated 49.
Do you know if this is a known bug of this DBMS?

Thank You for yr help and attention.
Regards

TdP
 
Try running this in Query Analyzer...

DBCC UPDATEUSAGE ('dbname')

Change dbname to your real database name.

-SQLBill

Posting advice: FAQ481-4875
 
This is becuase that window reads the stats of the table to get the row count, and your stats are out of date for that table (or the database). The code the SQLBill provided will update the stats.

Denny
MCSA (2003) / MCDBA (SQL 2000)

--Anything is possible. All it takes is a little research. (Me)
[noevil]
 
Enterprise Manager calls sp_MSTableSpace to get the details for Properties. That stored procedure pulls values from SYSINDEXES for the number of rows, and that table is not guaranteed to be accurate. So there are cases when you will see that it doesn't match the results of select count(*) from table. It is only meant to give a much faster, but close estimate. If you want accuracy and don't mind the time delay in doing so, you could change the sp_MSTableSpace stored procedure in Master. However, that may not be the best idea.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top