Wrong rowcount in properties

  • I copied 2 big tables from our test server to production overnite. I compared counts by clicking on table properties. The count for the first table matched exactly (51,016,636). The second table had a discrepancy even though the job ran successfully (8,571,364 versus 8,571,000). I was just going to recopy that table by itself but first I did a select count(*) in QA and got the correct count. Therefore, the count in properties in EM differs from QA.

    I did an UPDATE STATISTICS on that table hoping that would change it in properties, but no dice.

    I would like the counts to agree without recopying if possible because I have 6 more years of data to load into this database.

    Does anyone have any thoughts?

    Thanks.

    Randy

  • Try restarting EM (simple refresh might be enough).

  • Thanks, I already tried that with no luck.

  • how about sp_updatestats??

  • Just tried, didn't fix it.

  • And you restarted EM???

    No clue what's wrong. Maybe with a bigger sampling of the data, it would work.

  • Try using dbcc updateusage.

    --JP

  • Table Properties in Ent Mgr is not reliable.  You should use "select count(*) from table" to get accurate results.

  • He obviously knows since he already did update statistics.

  •  

    Try using dbcc updateusage.

    --JP

    -----------------------------------------

     

    This worked. Thanks JP.

    I thought there must be a simple solution.

  • Looks like I got to open up BOL for this one .

Viewing 11 posts - 1 through 10 (of 10 total)

You must be logged in to reply to this topic. Login to reply