Monday, March 26, 2012

optimizer shows high record count

We recently have found a query that started to run long (30 seconds as
opposed to <1). No significant change in data, statistics updated,
etc. SQLServer 2000 sp3
When looking at the rowcount on one of the execution plan tasks it
shows >9 million rows, the table only has 14K rows in it.
We've done dbcc on the table/indexes with no results/corruption. In
our development environment, this works as expected, that is the row
count matches the estimated row count.
Any thoughts?
Thanks in advance.
Jason
Have you updated the statistics or reindexed that table lately?
Andrew J. Kelly SQL MVP
"fc_celtic_fan" <jasonb@.brandes.com> wrote in message
news:1107996642.783750.242070@.g14g2000cwa.googlegr oups.com...
> We recently have found a query that started to run long (30 seconds as
> opposed to <1). No significant change in data, statistics updated,
> etc. SQLServer 2000 sp3
> When looking at the rowcount on one of the execution plan tasks it
> shows >9 million rows, the table only has 14K rows in it.
> We've done dbcc on the table/indexes with no results/corruption. In
> our development environment, this works as expected, that is the row
> count matches the estimated row count.
> Any thoughts?
> Thanks in advance.
> Jason
>
|||Yes we have been in the boat as well and we used to run DBCC
updateusage('dbname','tablename')
"Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> wrote in message
news:O1xTABxDFHA.2676@.TK2MSFTNGP12.phx.gbl...
> Have you updated the statistics or reindexed that table lately?
> --
> Andrew J. Kelly SQL MVP
>
> "fc_celtic_fan" <jasonb@.brandes.com> wrote in message
> news:1107996642.783750.242070@.g14g2000cwa.googlegr oups.com...
>
|||What does sysindexes say? Also, did you do UPDATEUSAGE with ROW_COUNT?
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
http://www.sqlug.se/
"Hassan" <fatima_ja@.hotmail.com> wrote in message news:Owi8xM0DFHA.3596@.TK2MSFTNGP10.phx.gbl...
> Yes we have been in the boat as well and we used to run DBCC
> updateusage('dbname','tablename')
> "Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> wrote in message
> news:O1xTABxDFHA.2676@.TK2MSFTNGP12.phx.gbl...
>

No comments:

Post a Comment