Hilfreich um die Komprimierungsmöglichkeit von (großen) Tabellen zu untersuchen.
/* -- Ermittelt Tabellennamen, Satzanzahl und Komprimierungsstatus */ USE Y33_ZDW GO SELECT OBJECT_NAME(object_id) AS [Objektname], SUM(Rows) AS [Satzanzahl], data_compression_desc AS [Komprimierungstyp] FROM sys.partitions WITH (NOLOCK) WHERE index_id < 2 --Partitionen von non-clustered Indizes ausschl. AND OBJECT_NAME(object_id) NOT LIKE N'sys%' -- Systemtab. ausschl. AND OBJECT_NAME(object_id) NOT LIKE N'queue_%' -- Warteschlangentab. ausschl. AND OBJECT_NAME(object_id) NOT LIKE N'filestream_tombstone%' -- Tombstonetab. ausschl. AND OBJECT_NAME(object_id) NOT LIKE N'fulltext%' -- Fulltextkatalogtab. ausschl. AND OBJECT_NAME(object_id) NOT LIKE N'ifts_comp_fragment%' -- Integrierte Full Text Suchtab. ausschl. AND OBJECT_NAME(object_id) NOT LIKE N'xml_index_nodes%' -- XML-Indextab. ausschl. GROUP BY object_id, data_compression_desc ORDER BY SUM(Rows) DESC;
Keine Kommentare:
Kommentar veröffentlichen