Home Microsoft SQL Server DigiMailing iRN Contact


  No additional text.

CREATE VIEW sys.stats AS
	SELECT id AS object_id, name,
		indid AS stats_id,
		sysconv(bit, status & 0x2000) AS auto_created,	-- IS_STATS_AUTO_CRT
		sysconv(bit, case when (status & 0x2001) = 0 then 1 else 0 end) AS user_created,
	  	sysconv(bit, status & 0x4000) AS no_recompute,	-- IS_STATS_NORECOMP
		sysconv(bit, status & 0x20000) AS has_filter,	-- IS_HAS_FILTER
		case when (status & 0x20000) != 0 then object_definition(id, indid, 9) else NULL end AS filter_definition -- x_euncStats
	FROM sys.sysidxstats
	WHERE  (status & 6146)  = 2			-- IS_EXPR_STATS | IS_SYSTEM_STATS
		AND has_access('CO', id) = 1		-- IS_STATS

Last revision 2008RTM
See also

  databases (View)
dm_db_index_usage_stats (View)
dm_db_missing_index_group_stats (View)
dm_db_partition_stats (View)
dm_exec_background_job_queue_stats (View)
dm_exec_procedure_stats (View)
dm_exec_query_stats (View)
dm_exec_query_transformation_stats (View)
dm_exec_trigger_stats (View)
dm_os_latch_stats (View)
dm_os_memory_node_access_stats (View)
dm_os_spinlock_stats (View)
dm_os_wait_stats (View)
indexes (View)
indexes$ (View)
internal_tables (View)
key_constraints (View)
spatial_indexes (View)
spatial_index_tessellations (View)
sp_autostats (Procedure)
sp_check_removable (Procedure)
sp_createstats (Procedure)
sp_detach_db (Procedure)
sp_estimated_rowsize_reduction_for_vardecimal (Procedure)
sp_estimate_data_compression_savings (Procedure)
sp_helpindex (Procedure)
sp_helpstats (Procedure)
sp_help_spatial_geography_index_helper (Procedure)
sp_help_spatial_geometry_index_helper (Procedure)
sp_help_spatial_index_internal (Procedure)
sp_indexoption (Procedure)
sp_MSadd_distribution_history (Procedure)
sp_MSadd_logreader_history (Procedure)
sp_MSadd_merge_history90 (Procedure)
sp_MSdrop_merge_agent (Procedure)
sp_MSenum_distribution (Procedure)
sp_MSenum_distribution_s (Procedure)
sp_MSenum_distribution_sd (Procedure)
sp_MSenum_logreader (Procedure)
sp_MSenum_logreader_s (Procedure)
sp_MSenum_logreader_sd (Procedure)
sp_MSenum_qreader_sd (Procedure)
sp_MSestimatemergesnapshotworkload (Procedure)
sp_MSestimatesnapshotworkload (Procedure)
sp_MSrepl_agentstatussummary (Procedure)
sp_MSrepl_distributionagentstatussummary (Procedure)
sp_MSrepl_get_Oracle_publisher_metadata (Procedure)
sp_MSsetupworktables (Procedure)
sp_MStable_validation (Procedure)
sp_rename (Procedure)
sp_spaceused (Procedure)
sp_statistics (Procedure)
sp_statistics_100 (Procedure)
sp_statistics_rowset (Procedure)
sp_statistics_rowset2 (Procedure)
sp_syscollector_event_onstatsupdate (Procedure)
sp_sysutility_mi_collect_dac_execution_statistics_internal (Procedure)
sp_sysutility_mi_get_dac_execution_statistics_internal (Procedure)
sp_sysutility_ucp_calculate_health (Procedure)
sp_sysutility_ucp_remove_mi (Procedure)
sp_table_statistics2_rowset (Procedure)
sp_table_validation (Procedure)
sp_updatestats (Procedure)
stats_columns (View)
syscollector_execution_stats (View)
sysdatabases (View)
sysindexes (View)
sysobjects (View)
tables (View)
xml_indexes (View)


  Query a named instance
SQL 2008 R2
Deprecated procedures in SQL2008
Reporting Services item-level role definitions
Create all your missing indexes
Converting datetime field
Start MSSQL Server Profiler at time
Replicating MSSQL Server views
Exploring Microsoft Sharepoint
The OLE DB provider "SQLNCLI10" for linked server indicates.
Mobile solar charger
Oracle to SQL Server replication
Cannot insert the value NULL into column
Undocumented Microsoft SQL Server 2008
Zoekmachine optimalisatie
SQL Servers hidden objects
Flash in Ajax
De hype die AJAX heet
Barcode scannen
MySQL; Gratis, makkelijk en snel!
sIFR; de combinatie tussen HTML en Flash