<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://www2.sqlblog.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Kalen Delaney : compression</title><link>http://www2.sqlblog.com/blogs/kalen_delaney/archive/tags/compression/default.aspx</link><description>Tags: compression</description><dc:language>en</dc:language><generator>CommunityServer 2.1 SP2 (Build: 61129.1)</generator><item><title>Did You Know? I gave two presentations last week</title><link>http://www2.sqlblog.com/blogs/kalen_delaney/archive/2010/06/14/-two-presentations-last-week.aspx</link><pubDate>Mon, 14 Jun 2010 15:05:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:26183</guid><dc:creator>Kalen Delaney</dc:creator><slash:comments>3</slash:comments><comments>http://www2.sqlblog.com/blogs/kalen_delaney/comments/26183.aspx</comments><wfw:commentRss>http://www2.sqlblog.com/blogs/kalen_delaney/commentrss.aspx?PostID=26183</wfw:commentRss><description>Even though I didn't make it to TechEd this year, it didn't mean I was quiet last week. On Wednesday, I was in Colorado, giving a talk for the new Colorado PASS User Group, which is a joint venture between 3 different existing groups from Colorado Springs,...(&lt;a href="http://www2.sqlblog.com/blogs/kalen_delaney/archive/2010/06/14/-two-presentations-last-week.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://www2.sqlblog.com/aggbug.aspx?PostID=26183" width="1" height="1"&gt;</description><category domain="http://www2.sqlblog.com/blogs/kalen_delaney/archive/tags/internals/default.aspx">internals</category><category domain="http://www2.sqlblog.com/blogs/kalen_delaney/archive/tags/user+groups/default.aspx">user groups</category><category domain="http://www2.sqlblog.com/blogs/kalen_delaney/archive/tags/SQL+Server+2008/default.aspx">SQL Server 2008</category><category domain="http://www2.sqlblog.com/blogs/kalen_delaney/archive/tags/conference/default.aspx">conference</category><category domain="http://www2.sqlblog.com/blogs/kalen_delaney/archive/tags/compression/default.aspx">compression</category></item><item><title>Did You Know: My Next Public Event at SQL Saturday in REDMOND</title><link>http://www2.sqlblog.com/blogs/kalen_delaney/archive/2009/09/20/sql-saturday-in-redmond.aspx</link><pubDate>Mon, 21 Sep 2009 02:59:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:16908</guid><dc:creator>Kalen Delaney</dc:creator><slash:comments>2</slash:comments><comments>http://www2.sqlblog.com/blogs/kalen_delaney/comments/16908.aspx</comments><wfw:commentRss>http://www2.sqlblog.com/blogs/kalen_delaney/commentrss.aspx?PostID=16908</wfw:commentRss><description>My Boston class is SOLD OUT, but those of you in the Beautiful Pacific Northwest have an opportunity to come hear me at SQL Saturday in Redmond WA on Oct 3. I'll be speaking about compression in SQL Server 2008. Check out the schedule of 3 concurrent...(&lt;a href="http://www2.sqlblog.com/blogs/kalen_delaney/archive/2009/09/20/sql-saturday-in-redmond.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://www2.sqlblog.com/aggbug.aspx?PostID=16908" width="1" height="1"&gt;</description><category domain="http://www2.sqlblog.com/blogs/kalen_delaney/archive/tags/user+groups/default.aspx">user groups</category><category domain="http://www2.sqlblog.com/blogs/kalen_delaney/archive/tags/conference/default.aspx">conference</category><category domain="http://www2.sqlblog.com/blogs/kalen_delaney/archive/tags/compression/default.aspx">compression</category></item><item><title>Geek City: Two Compression Questions and Parameter Metadata</title><link>http://www2.sqlblog.com/blogs/kalen_delaney/archive/2009/03/10/two-compression-questions-and-parameter-metadata.aspx</link><pubDate>Tue, 10 Mar 2009 17:46:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:12539</guid><dc:creator>Kalen Delaney</dc:creator><slash:comments>3</slash:comments><comments>http://www2.sqlblog.com/blogs/kalen_delaney/comments/12539.aspx</comments><wfw:commentRss>http://www2.sqlblog.com/blogs/kalen_delaney/commentrss.aspx?PostID=12539</wfw:commentRss><description>&lt;P&gt;I am teaching the SQL 2008 version of my course for the first time this week. My life is still is disarray and spare time is practically non-existent.&amp;nbsp; During the evenings after I class I am trying to get caught up on several projects that I fell way behind on&amp;nbsp;over the last month when most of my time was spent in the hospital. Blogging has been put on the back burner, but I thought I could share some of the questions that came up in class on the first day.&amp;nbsp; I usually try to track down answers to open questions, and then share them with the students the next day.&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#0000ff&gt;&lt;I&gt;1. Why can't the stored procedure sp_estimate_data_compression_savings be available on SQL Server 2008 Standard Edition, instead of just Enterprise, Developer and Evaluation? We realize that compression is an Enterprise only feature, but if non-Enterprise users could see how much space they would save, it might help them determine whether Enterprise Edition is worth while?&lt;/I&gt;&lt;/FONT&gt; &lt;/P&gt;
&lt;P&gt;(OK, here's a really geeky part... speaking of Enterprise, my #1 son sent me &lt;A href="http://www.traileraddict.com/trailer/star-trek-xi/feature-trailer"&gt;this link&lt;/A&gt; yesterday. ) &lt;/P&gt;
&lt;P&gt;Now I'm not saying that Microsoft should be obnoxious about this and say "See what you could save if you upgraded to Enterprise",&amp;nbsp; and do that whether the user wants to know or not. It would be on request, when the user ran this procedure. &lt;/P&gt;
&lt;P&gt;I also understand that the procedure actually applies compression to a sample of pages to compute the savings potential. And it was confirmed last night when I started researching this question that Enterprise features are just turned on and off through a switch so it actually would be easy enough to just not do the check for Enterprise Edition within this stored procedure. Microsoft is looking at possibly making this change, but it looks like it might not happen before the next major release.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#0000ff&gt;&lt;I&gt;2. Since page compression is applied on a page by page basis, what's the point of compressing a read-only table? Each page would be compressed, perhaps into a small amount of space, but if no new rows were added, the empty space on each page wouldn't get used and we would still have the same number of pages in the table.&lt;/I&gt;&lt;/FONT&gt; &lt;/P&gt;
&lt;P&gt;Although it is true that compression is applied on each page individually, you need to rebuild the table or index in order to compress it, with ALTER TABLE or ALTER INDEX.&amp;nbsp; And rebuilding a table or index moves the data to all new pages. So as the table is being rebuilt, when a page gets full, it is compressed, but then more rows can be added, and when are sufficient number are added, it gets recompressed, and keeps getting recompressed as more rows are added, until there is no chance of any more more rows being added. So during the rebuild process the table really isn't read-only, as the original data is being inserted into the a new copy of the table. You could end up with far few pages.&lt;/P&gt;
&lt;P&gt;This is pretty easy to test out, by just compressing a relatively full table of your own into a test table (so no one will update it) and then compressing it. It should take less space. &lt;/P&gt;
&lt;P&gt;There are lots of compression scripts, plus a lot more detail about how compression works, in my new book, which is scheduled for release TOMORROW!!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#0000ff&gt;&lt;I&gt;3. Where is the metadata that contains the default values of SQL Server stored procedure parameters?&lt;/I&gt;&lt;/FONT&gt; &lt;/P&gt;
&lt;P&gt;Uh, the answer appears to be 'None of the above'. There is no metadata, either system views or system tables (viewable using the DAC) that contains this information. &lt;/P&gt;
&lt;P&gt;You can read this Connect request for more details (and even vote for it if you like): &lt;/P&gt;
&lt;P&gt;&lt;A title=https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=234143 href="https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=234143"&gt;https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=234143&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;It does seem strange that this information is not available and it's hard to believe SQL Server parses the procedure definition every time it wants to know the default.&amp;nbsp; It turns out that even if all you want to know is whether or not a default exists is not easy to find. (You might want to know that to be able to determine if a parameter is optional.)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So now you know.&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#ff00ff size=4&gt;~Kalen&lt;/FONT&gt;&lt;/P&gt;&lt;img src="http://www2.sqlblog.com/aggbug.aspx?PostID=12539" width="1" height="1"&gt;</description><category domain="http://www2.sqlblog.com/blogs/kalen_delaney/archive/tags/metadata/default.aspx">metadata</category><category domain="http://www2.sqlblog.com/blogs/kalen_delaney/archive/tags/SQL+Server+2008/default.aspx">SQL Server 2008</category><category domain="http://www2.sqlblog.com/blogs/kalen_delaney/archive/tags/compression/default.aspx">compression</category></item></channel></rss>