Home > Archive > MS SQL Server > October 2005 > Wrong Record Count









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Wrong Record Count
eAW

2005-10-28, 1:23 pm

The number of rows shown in SELECT COUNT(*) statement is different from the
number displayed on table property. I know the number returned by select
statement is correct. How do I correct it? I have tried DBCC CHECKDB with
REPAIR_ALLOW_DATA_LO
SS option.


David Gugick

2005-10-28, 1:23 pm

eAW wrote:
> The number of rows shown in SELECT COUNT(*) statement is different
> from the number displayed on table property. I know the number
> returned by select statement is correct. How do I correct it? I have
> tried DBCC CHECKDB with REPAIR_ALLOW_DATA_LO
SS option.


That information is not kept real time. You can try using DBCC
UPDATEUSAGE to update those stats.

--
David Gugick
Quest Software
www.imceda.com
www.quest.com

SQL

2005-10-28, 1:23 pm

how about running DBCC UPDATEUSAGE

------------------------------------------------------------------------------------------
"I sense many useless updates in you... Useless updates lead to
fragmentation... Fragmentation leads to downtime...Downtime leads to
suffering..Fragmentation is the path to the darkside.. DBCC INDEXDEFRAG
and DBCC DBREINDEX are the force...May the force be with you" --
http://sqlservercode.blogspot.com/

Paul S Randal [MS]

2005-10-28, 8:23 pm

What prompted you to run REPAIR_ALLOW_DATA_LO
SS?

--
Paul Randal
Dev Lead, Microsoft SQL Server Storage Engine

This posting is provided "AS IS" with no warranties, and confers no rights.

"eAW" <anwang@mailcity.com> wrote in message
news:Oj93xQ%232FHA.3276@TK2MSFTNGP10.phx.gbl...
> The number of rows shown in SELECT COUNT(*) statement is different from
> the number displayed on table property. I know the number returned by
> select statement is correct. How do I correct it? I have tried DBCC
> CHECKDB with REPAIR_ALLOW_DATA_LO
SS option.
>



David Gugick

2005-10-28, 8:23 pm

Paul S Randal [MS] wrote:
> What prompted you to run REPAIR_ALLOW_DATA_LO
SS?
>


I assume the OP thought this information was always kept up to date.

--
David Gugick
Quest Software
www.imceda.com
www.quest.com
Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com