Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- select
- a.index_id,
- OBJECT_NAME(b.object_id) as object,
- name,
- avg_fragmentation_in_percent as frag,
- fragment_count,
- avg_fragment_size_in_pages,
- *
- from
- sys.dm_db_index_physical_stats (DB_ID('Pricing'), null, NULL, NULL, NULL) as a
- INNER join
- sys.indexes as b on
- a.object_id = b.object_id and
- a.index_id = b.index_id
- ORDER BY
- frag DESC
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement