SQL Server Statistics

  • Hi to all,

    is it possible to force SQL Server 2008 not to use Range_ROWS in its statistic ?

    I have the follwing statitic and want avoid the Range_ROWS, all should be zero:

    RANGE_HI_KEYRANGE_ROWSEQ_ROWSDISTINCT_RANGE_ROWS

    2012052802010

    2012053003111

    2012053102010

    2012060102010

    2012060402010

    2012060602111

    Thanks in advance

  • Why?

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Because we have a query which used Nested Loops if we have RANGE_ROWS and then the query performes worse.

    But we can't change the query at the moment, that is the problem

  • Please post table definitions, index definitions and execution plan.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • You can't directly control what gets created in statistics, but you can create specific types of statistics. Try creating a filtered statistic. I'm not sure what you'd filter by in this case, but that can change what is represented within the statistics.

    But, as Gail says, for a more specific recommendation, you need to post a lot more information.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

Viewing 5 posts - 1 through 4 (of 4 total)

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