Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

SQL Server Statistics Expand / Collapse
Author
Message
Posted Tuesday, November 27, 2012 11:27 PM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Today @ 5:58 AM
Points: 43, Visits: 273
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_KEY RANGE_ROWS EQ_ROWS DISTINCT_RANGE_ROWS
2012052802 0 1 0
2012053003 1 1 1
2012053102 0 1 0
2012060102 0 1 0
2012060402 0 1 0
2012060602 1 1 1

Thanks in advance

Post #1389518
Posted Wednesday, November 28, 2012 12:46 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 8:31 AM
Points: 40,456, Visits: 36,912
Why?


Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
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

Post #1389547
Posted Wednesday, November 28, 2012 1:32 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Today @ 5:58 AM
Points: 43, Visits: 273
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
Post #1389562
Posted Wednesday, November 28, 2012 1:43 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 8:31 AM
Points: 40,456, Visits: 36,912
Please post table definitions, index definitions and execution plan.


Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
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

Post #1389570
Posted Wednesday, November 28, 2012 7:50 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 8:42 AM
Points: 14,037, Visits: 28,407
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
The Scary DBA
Author of: SQL Server Query Performance Tuning
SQL Server 2012 Query Performance Tuning
SQL Server 2008 Query Performance Tuning Distilled
and
SQL Server Execution Plans

Product Evangelist for Red Gate Software
Post #1389792
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse