Indexes showing up as statistics??

I have a series of indexes that are showing as statistics. Is it because they are filtered or are defined as constraints?

July 15th, 2015 3:34pm

Statistics is collected both on indexes and columns used in the query.

Columns statistics is collected based on the settings in the database properties. If Auto create Statistis is set to True, column statistics are gathered automatically.

That's why you notice _WA_Sys* statistics. For index statistics it is created when you create the index on a table.
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Name                            Updated                         Rows                            Rows Sampled                    Steps                           Density                         Average Key Length              String Index                    
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
$pk_act                        Jun 16 2015  2:00AM             386983                          386983                          33                              1                               5                               NO                                                              386983                          

All Density                     Average Length                  Columns                         
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
2.584093E-06                    5                               id                      

Histogram Steps                 
RANGE_HI_KEY                    RANGE_ROWS                      EQ_ROWS                         DISTINCT_RANGE_ROWS             AVG_RANGE_ROWS                  
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
0                               0                               1                               0                               1                               
31812                           29894                           1                               29894                           1                               
34151                           2047		
Free Windows Admin Tool Kit Click here and download it now
July 16th, 2015 1:22am

Hello John,

That's a misunderstanding. By default the database Option AUTO_CREATE_STATISTICS is set to on and then for each new index a corresponding statistic will be created with the same name; see Statistics

You can validate it by querying sys.stats => column "auto_created"

select *
from sys.stats

July 16th, 2015 2:52am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics