Results 1 to 6 of 6
  1. #1
    Join Date
    May 2002
    Location
    New York
    Posts
    35

    Unanswered: sp_spaceused result

    Hi,
    I ran sp_spaceused against a DB table, and got -160K in the field "unused". If anybody can explain what this negative number means?
    We have a problem with performance. It's extremly slow. The table contains 600,000 records. Even simple select * from <table> (table scan) takes 6 minutes. This is SQL Server2000.
    Any help is appreciated.

  2. #2
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    The negative number means that your database statistics are out of date. You need to run sp_updatestats.

    -PatP

  3. #3
    Join Date
    May 2002
    Location
    New York
    Posts
    35
    Thank you so much! I've just run it. I'm glad I made a right decision. And hopefuly, it will improve the performance.

  4. #4
    Join Date
    May 2002
    Location
    New York
    Posts
    35
    After I ran sp_updatestats the problem is still there. Field unused -176K !!!!
    Please help!!!!
    Thanks

  5. #5
    Join Date
    May 2004
    Location
    Seattle
    Posts
    1,313
    does this table have a clustered index?

    I had a similar problem recently with a much larger table (700m rows) on 2005. Even this simple query would not return - it just hung:

    select top 1 * from bigboy

    I rebuilt the clustered index (the only index on the table), and things were good again.

  6. #6
    Join Date
    May 2002
    Location
    New York
    Posts
    35
    No, this table has just one non-clustered index, on one field. sp_spaceused returns -176K in unused field even after sp_updatestast was applied.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •