Click to Rate and Give Feedback
TechNet
TechNet Library
SQL Server
SQL Server 2008
Database Engine
Technical Reference
 sys.stats (Transact-SQL)
Community Content
In this section
Statistics Annotations (1)
Collapse All/Expand All Collapse All
Other versions are also available for the following:
sys.stats (Transact-SQL)

Contains a row for each statistic of a tabular object of the type U, V, or TF.

NoteNote

Every index will have a corresponding statistics row with the same name and ID (index_id = stats_id), but not every statistics row has a corresponding index.

Column name

Data type

Description

object_id

int

ID of the object to which these statistics belong.

name

sysname

Name of the statistics. Is unique within the object.

stats_id

int

ID of the statistics. Is unique within the object.

auto_created

bit

Statistics were auto-created by the query processor.

user_created

bit

Statistics were explicitly created by the user.

no_recompute

bit

Statistics were created with the NORECOMPUTE option.

has_filter

bit

1 = Statistics have a filter and are computed only on rows that satisfy the filter definition.

0 = Statistics do not have a filter and are computed on all rows.

filter_definition

nvarchar(max)

Expression for the subset of rows included in filtered statistics.

NULL = Non-filtered statistics.

In SQL Server 2005 and later versions, the visibility of the metadata in catalog views is limited to securables that a user either owns or on which the user has been granted some permission. For more information, see Metadata Visibility Configuration.

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Every index does not have a corresponding stats row      Matt Whitfield   |   Edit   |   Show History
Every relational index has a corresponsing stats row, but XML indexes and spatial indexes do not have corresponding stats rows.
Processing
© 2012 Microsoft. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker