Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Script to Compress Tables and Indexes Expand / Collapse
Author
Message
Posted Tuesday, December 15, 2009 9:26 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Yesterday @ 1:37 PM
Points: 2,854, Visits: 3,039
Comments posted to this topic are about the item Script to Compress Tables and Indexes
Post #834590
Posted Wednesday, November 23, 2011 7:36 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, September 26, 2013 9:52 AM
Points: 1, Visits: 50
Just looking and running this script you need to add a DISTINCT to the select it returns multiple duplicate statements for both ALTER TABLE and ALTER INDEX statements
Post #1211019
Posted Monday, December 12, 2011 4:59 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Thursday, April 17, 2014 4:56 AM
Points: 1,002, Visits: 884
You could improve upon this script by using sys.partitions to only include rebuild statements for tables that are already uncompressed. This script will rebuild all tables, regardless of whether or not they are already compressed.

/* ----------------------------- */
Tochter aus Elysium, Wir betreten feuertrunken, Himmlische, dein Heiligtum!

Post #1220118
Posted Sunday, January 15, 2012 11:40 PM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Thursday, February 2, 2012 10:24 PM
Points: 56, Visits: 195
After using row/page/index compression in SQL 2008 DB, I noticed that DB size is increased. Before compression the DB size was 69 GB. After row compression on all tables, size increased to 73GB. Please explain.
Post #1236394
Posted Monday, January 16, 2012 5:01 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Thursday, April 17, 2014 4:56 AM
Points: 1,002, Visits: 884
Soorya (1/15/2012)
After using row/page/index compression in SQL 2008 DB, I noticed that DB size is increased. Before compression the DB size was 69 GB. After row compression on all tables, size increased to 73GB. Please explain.


Check in the GUI to make sure that they are compressed. Then check that compression will compress. Compression does not always lead to data savings, especially row compression. It's very dependent on the data that is being compressed.


/* ----------------------------- */
Tochter aus Elysium, Wir betreten feuertrunken, Himmlische, dein Heiligtum!

Post #1236519
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse