Wednesday, March 7, 2012

How is sysindexes.rows updated by SQL Server?

I know that the rows column on sysindexes is not always accurate, and
that I can force and update by using DBCC UPDATEUSAGE, but I'm
wondering what happens "behind the scenes" so that this value is
eventually updated with the correct value.
The particular example that I'm working with is this: a developer
noticed that the rows property on the table pop-up in EM doesn't match
the actual row count. I explained to him why the values didn't match,
but I have to believe that eventually this value will be changed and
EM will report the accurate row count. Is this correct?
Thanks in advance!
Maria
One thing that corrects the value is DBCC CHECKDB (which I assume that you run regularly).
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Maria Vogel" <vogelm@.meijer.com> wrote in message news:1715eae1.0405110654.460c627@.posting.google.co m...
> I know that the rows column on sysindexes is not always accurate, and
> that I can force and update by using DBCC UPDATEUSAGE, but I'm
> wondering what happens "behind the scenes" so that this value is
> eventually updated with the correct value.
> The particular example that I'm working with is this: a developer
> noticed that the rows property on the table pop-up in EM doesn't match
> the actual row count. I explained to him why the values didn't match,
> but I have to believe that eventually this value will be changed and
> EM will report the accurate row count. Is this correct?
> Thanks in advance!
> Maria
|||Tibor, no it doesn't. Only DBCC UPDATEUSAGE does it.
Paul Randal
Dev Lead, Microsoft SQL Server Storage Engine
This posting is provided "AS IS" with no warranties, and confers no rights.
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:evWisr$NEHA.3596@.tk2msftngp13.phx.gbl...
> One thing that corrects the value is DBCC CHECKDB (which I assume that you
run regularly).
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
>
> "Maria Vogel" <vogelm@.meijer.com> wrote in message
news:1715eae1.0405110654.460c627@.posting.google.co m...
>
|||Ahh, thanks Paul. I didn't know that was changed since the old days (I still recall 6.5, where only way to
adjust space allocation for syslogs was through CHECKDB...). :-)
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Paul S Randal [MS]" <prandal@.online.microsoft.com> wrote in message
news:%23OrDTGFOEHA.1104@.TK2MSFTNGP10.phx.gbl...
> Tibor, no it doesn't. Only DBCC UPDATEUSAGE does it.
> --
> Paul Randal
> Dev Lead, Microsoft SQL Server Storage Engine
> This posting is provided "AS IS" with no warranties, and confers no rights.
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
> message news:evWisr$NEHA.3596@.tk2msftngp13.phx.gbl...
> run regularly).
> news:1715eae1.0405110654.460c627@.posting.google.co m...
>

No comments:

Post a Comment