Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
lebedev
Posting Yak Master
126 Posts |
Posted - 2009-09-15 : 14:59:25
|
I have noticed that one of our SQL Server 2005 databases is extremely slow. I noticed that the LDF file is 25GB in size. I realized that the database did not have a maintenance plan set up, which is the root of the problem.My question is about the strange behavior that I observed while the database was in that state. When I right-click and view properties of one of the tables I see that the row count is over 4B, however when I run count(*) query it returns 13K. Why such a discrepancy?Thanks,Alec |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
lebedev
Posting Yak Master
126 Posts |
Posted - 2009-09-16 : 12:28:44
|
No, this was a fresh SQL Server 2005 SP1 installation. |
 |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
lebedev
Posting Yak Master
126 Posts |
Posted - 2009-09-16 : 13:47:23
|
I tried the following to no vail:dbcc UPDATEUSAGE(mydb)dbcc UPDATEUSAGE(mydb, "dbo.mytable") |
 |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
lebedev
Posting Yak Master
126 Posts |
Posted - 2009-09-17 : 15:42:57
|
FYI, the number of rows displayed in the table properties is 4294982522.The output of "select @@version" is:Microsoft SQL Server 2005 - 9.00.4035.00 (Intel X86) Nov 24 2008 13:01:59 Copyright (c) 1988-2005 Microsoft Corporation Standard Edition on Windows NT 5.1 (Build 2600: Service Pack 2) |
 |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
|
|