15 lines
622 B
SQL
15 lines
622 B
SQL
select *
|
|
from (
|
|
SELECT sp.stats_id, name, filter_definition, last_updated, rows, rows_sampled, steps, unfiltered_rows, modification_counter
|
|
, stat.object_id
|
|
FROM sys.stats AS stat
|
|
CROSS APPLY sys.dm_db_stats_properties(stat.object_id, stat.stats_id) AS sp) x
|
|
inner join sys.objects obj on x.object_id = obj.object_id
|
|
where obj.type = 'U'
|
|
order by last_updated desc
|
|
|
|
|
|
SELECT sp.stats_id, name, filter_definition, last_updated, rows, rows_sampled, steps, unfiltered_rows, modification_counter
|
|
, stat.object_id
|
|
FROM sys.stats AS stat
|
|
CROSS APPLY sys.dm_db_stats_properties(stat.object_id, stat.stats_id) AS sp |