<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" version="2.0">

<channel>
	<title>Bob Pusateri - The Outer Join</title>
	
	<link>http://www.bobpusateri.com</link>
	<description>Bob Pusateri's thoughts on SQL Server and kindred subjects</description>
	<lastBuildDate>Tue, 15 May 2012 12:30:16 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/TheOuterJoin" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="theouterjoin" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>The 1940 Census: A True NoSQL Database!</title>
		<link>http://www.bobpusateri.com/archive/2012/05/the-1940-census-a-true-nosql-database/</link>
		<comments>http://www.bobpusateri.com/archive/2012/05/the-1940-census-a-true-nosql-database/#comments</comments>
		<pubDate>Tue, 15 May 2012 12:30:16 +0000</pubDate>
		<dc:creator>Bob Pusateri</dc:creator>
				<category><![CDATA[SQLServerPedia Syndication]]></category>
		<category><![CDATA[Thoughts]]></category>

		<guid isPermaLink="false">http://www.bobpusateri.com/?p=738</guid>
		<description><![CDATA[<p>On April 2 of this year, the National Archives released the complete population schedule of the 1940 census. These records were highly anticipated not only for their genealogical value but also because of their detailed information about an incredibly interesting period of U.S. History. This census captured the point in time where the country was [...]]]></description>
			<content:encoded><![CDATA[<p>On April 2 of this year, the National Archives released the complete population schedule of the 1940 census. These records were highly anticipated not only for their genealogical value but also because of their detailed information about an incredibly interesting period of U.S. History. This census captured the point in time where the country was finally starting to come out of the great depression but had not yet entered World War II. Many questions it included were new and designed to gauge the effects of the depression, with topics including income, education, unemployment, and migration. In 1940, millions were employed by the <a href="http://en.wikipedia.org/wiki/Works_Progress_Administration" target="_blank">WPA</a>, <a href="http://en.wikipedia.org/wiki/Public_Works_Administration" target="_blank">PWA</a>, and other New Deal agencies, and the <a href="http://en.wikipedia.org/wiki/Farm_Security_Administration" target="_blank">Farm Security Administration&#8217;s</a> photography program had a small group of photographers traversing the nation capturing images of everyday American life. <a href="http://en.wikipedia.org/wiki/File:Woodstock-Wolcott-snowy-night.jpeg" target="_blank">Some</a> <a href="http://en.wikipedia.org/wiki/File:Riverting_team2.jpg" target="_blank">of</a> <a href="http://en.wikipedia.org/wiki/File:C_and_N_RR_Chicago.jpg" target="_blank">my</a> <a href="http://en.wikipedia.org/wiki/File:Locomotives-Roundhouse2.jpg" target="_blank">favorite</a> <a href="http://en.wikipedia.org/wiki/File:Chicago_Union_Station_1943.jpg" target="_blank">photos</a> <a href="http://commons.wikimedia.org/wiki/File:Esther_Bubley,_A_radio_is_company_for_this_girl_in_her_boardinghouse_room,_Washington,_D.C.,_1943.jpg" target="_blank">come</a> <a href="http://commons.wikimedia.org/wiki/File:Pabst_Blue_Ribbon_beer_sign_in_Chicago.jpg" target="_blank">from</a> <a href="http://commons.wikimedia.org/wiki/File:Jack_Delano_-_Retiring_a_locomotive_driver_wheel,_Shopton,_Iowa.jpg" target="_blank">this</a> <a href="http://commons.wikimedia.org/wiki/File:Santa_Fe_RR_locomotive_shop_fsac1a34710u.jpg" target="_blank">collection</a>.</p>
<div class="wp-caption alignright" style="width: 410px;  border: 1px solid #dddddd; background-color: #f3f3f3; padding-top: 4px; margin: 10px; text-align:center; float: right;"><a href="http://img.bobpusateri.com/bc/2012/05/PopulationSchedule_lg.jpg" target="_blank"><img class=" " src="http://img.bobpusateri.com/bc/2012/05/PopulationSchedule_sm.jpg" alt="Population Schedule Form" width="400" height="300" /></a><p style=' padding: 0 4px 5px; margin: 0;'  class="wp-caption-text">Population Schedule Form (Click to Enlarge)</p></div>
<p>As interesting as the Census is for all its historical and social reasons, there&#8217;s an equally awesome tale to be told of all its data and the technologies behind it. Setting up a table in SQL Server to store 310 million rows and aggregate results from them would be pretty easy today &#8211; many DBAs deal with tables that are orders of magnitude larger than that, but in 1940 it was a major undertaking involving thousands of workers. Today the census is still a non-trivial task, however I&#8217;d imagine most of that work goes into getting data from the population into a database, while calculating the results from that is relatively simple.</p>
<p><strong>ETL: Enumerate, Tabulate, Lock Up</strong><br />
Prior to 1960, censuses weren&#8217;t mailed to your house like they are now. Instead every household was visited in person by an enumerator, a single person responsible for an &#8220;Enumeration District&#8221;, or &#8220;ED&#8221;. EDs varied wildly in size, and could consist of a single block in a large city, or an entire township in a more rural area. The enumerator would stop by and ask questions about each member of your household while writing the answers onto a population schedule form that measured 23.75&#8243; wide by 18.5&#8243; high. Yep, the entire database was on paper. Torn page detection must have been a very serious issue! When the enumerator had information about every last person in their district, they would send their data to the Census Office via <s>log shipping</s> Registered Mail.</p>
<p>Once in Washington, an army of operators transferred each record from the population schedule forms to a punch card. Punch cards had been used to tabulate the census since 1890 and were still the best technology available fifty years later. The 1880 census was tabulated by hand, which took 7 years to complete. Knowing there had to be a better way to calculate results, former census employee <a href="http://en.wikipedia.org/wiki/Herman_Hollerith" target="_blank">Herman Hollerith</a> set out to create a machine that could count results from data stored on punched cards. He won a contract to tabulate the 1890 census, which was completed in only 1 year. By 1900, he had formed the Tabulating Machine Company and greatly increased his fees, knowing he had a monopoly and the Census Office would have no other option than to pay them. By 1910, census employees had developed and patented their own counting machine to avoid using Hollerith&#8217;s. The Tabulating Machine Company, which by then had merged and changed names to the Computer Tabulating Recording Company, was nearly bankrupted by the loss of business. They eventually got their act together and were able to turn a profit. In 1924, Computer Tabulating Recording Company changed its name to <a href="http://en.wikipedia.org/wiki/Ibm" target="_blank">International Business Machines Corporation</a>.</p>
<div class="wp-caption alignright" style="width: 410px;  border: 1px solid #dddddd; background-color: #f3f3f3; padding-top: 4px; margin: 10px; text-align:center; float: right;"><a href="http://img.bobpusateri.com/bc/2012/05/Tabulating.jpg" target="_blank"><img class=" " src="http://img.bobpusateri.com/bc/2012/05/Tabulating_sm.jpg" alt="Tabulating by Machine" width="400" height="325" /></a><p style=' padding: 0 4px 5px; margin: 0;'  class="wp-caption-text">Women in (1940) Technology: Tabulating By Machine</p></div>
<p>After the records were copied to punch cards and tabulated by machine, the aggregated results were released immediately for uses like determining congressional seats and allocation of public funds. Since the population schedules contain information on individuals, they are <a href="http://www.census.gov/history/www/genealogy/decennial_census_records/the_72_year_rule_1.html" target="_blank">held for 72 years</a> before being released for research purposes. Rather than keep all 3.9 million pages of records on paper, the Census Office used the most compressed format available at the time, <a href="http://en.wikipedia.org/wiki/Microfilm" target="_blank">microfilm</a>. Apparently they had not yet discovered the rather obscure and undocumented BACKUP CENSUS TO TAPE=’MICROFILM’ WITH COMPRESSION; command. The records released this year are images scanned from that microfilm.</p>
<p><strong>Indexing</strong><br />
Since all the data consists of images, there&#8217;s no easy way to index them. Optical character recognition software is pretty good these days, but probably not good enough to pick out the handwriting in these images – most of which is in cursive. Instead everything was indexed by enumeration district, meaning you need to know where someone was living during April of 1940 before you can search for them. Many genealogy websites are now working on indexing this data by name, but it is not expected to be completed for a few months.</p>
<p><strong>Finding Your Family</strong><br />
If you had relatives in the US in 1940 and know where they lived at that time, I highly recommend looking for them. Everything can be found for free at <a href="http://1940census.archives.gov" target="_blank">http://1940census.archives.gov</a>. The first thing you’ll need to do is find which enumeration district they lived in. If you have an address, you are very much in luck. If you only have a general idea of where they were, then you’ll probably have to do a bit more work to find them. The census site lets you drill down by state, county, and city, and provides a list of EDs that apply. If you’re searching in an urban area you might need to use maps and/or descriptions returned by the search to narrow down exactly which ED they were in. If the official site isn’t finding anything for you, I’ve also had luck using <a href="http://stevemorse.org/census/unified.html" target="_blank">Steve Morse’s 1940 ED Finder</a>. Once armed with a list of relevant enumeration districts, you can view or download the population schedules from each district and look for people you recognize. You’ll probably end up looking through all the sheets because the entries on the forms aren’t always in order. My guess is that enumerators would start going down a street, skip houses where nobody was at home and then come back to them later.</p>
<p>I was fortunate enough to find all of my family, and it&#8217;s really neat to be able to see a snapshot of their lives at a time when my grandparents were close to my age. It also gave me great appreciation for what a chore recordkeeping was in that era! Even if you have no relatives in this census I think it&#8217;s still worth taking a look at &#8211; it was very interesting to see what kinds of jobs people had, their education level, and how much they were paid. My family was in the suburbs of Chicago at that time, and probably 7 out of 10 people in their area worked in &#8220;telephone manufacturing&#8221; which would have been at <a href="http://en.wikipedia.org/wiki/Western_Electric" target="_blank">Western Electric&#8217;s</a> <a href="http://en.wikipedia.org/wiki/Hawthorne_Works" target="_blank">Hawthorne Works</a>. My wife&#8217;s family was in a rural area downstate, and practically everyone worked on a farm and the few who didn&#8217;t were employed by the WPA. The best job title I saw when searching for her family was &#8220;chicken picker&#8221;.</p>
<p>Best of luck if you end up searching for your ancestors. If you find any who were employed as a chicken picker, let me know!</p>
<p><strong>Fun Videos</strong></p>
<ul>
<li><a href="http://www.youtube.com/watch?v=xowzij1Ixuo" target="_blank">Short Video on how the National Archives digitized the microfilm</a></li>
<li><a href="http://www.youtube.com/watch?v=cImIlPSuyR8" target="_blank">Newsreel informing people about the upcoming 1940 Census</a></li>
<li><a href="http://www.youtube.com/watch?v=OwZk6rASC8k" target="_blank">Training film for enumerators</a></li>
</ul>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/TheOuterJoin?a=TBv-qlMtjtA:xc30fJ0Mhh4:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/TheOuterJoin?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/TheOuterJoin?a=TBv-qlMtjtA:xc30fJ0Mhh4:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/TheOuterJoin?i=TBv-qlMtjtA:xc30fJ0Mhh4:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/TheOuterJoin/~4/TBv-qlMtjtA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.bobpusateri.com/archive/2012/05/the-1940-census-a-true-nosql-database/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SQL Saturday #119 Update</title>
		<link>http://www.bobpusateri.com/archive/2012/05/sql-saturday-119-update/</link>
		<comments>http://www.bobpusateri.com/archive/2012/05/sql-saturday-119-update/#comments</comments>
		<pubDate>Thu, 03 May 2012 14:41:58 +0000</pubDate>
		<dc:creator>Bob Pusateri</dc:creator>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Saturday]]></category>

		<guid isPermaLink="false">http://www.bobpusateri.com/?p=736</guid>
		<description><![CDATA[<p>Chicago&#8217;s third annual SQL Saturday will soon be upon us, and as food and beverage coordinator it&#8217;s my job to obsess over what&#8217;s on the menu. </p>
<p>SQL Saturday food offerings seem to have evolved over time. The first few I attended offered pizza, which is of course a great way to feed a large number [...]]]></description>
			<content:encoded><![CDATA[<p>Chicago&#8217;s third annual SQL Saturday will soon be upon us, and as food and beverage coordinator it&#8217;s my job to obsess over what&#8217;s on the menu. </p>
<p>SQL Saturday food offerings seem to have evolved over time. The first few I attended offered pizza, which is of course a great way to feed a large number of people. While very cost-effective, pizza is also not all that exciting. This did not go unnoticed; it seems there was a shift to more local food specialties that aren&#8217;t pizza. Lately I&#8217;ve seen more local offerings like amazing barbecue in <a href="http://www.bobpusateri.com/archive/2011/11/sql-saturday-101-wrap-up/" target="_blank">Kansas City</a> and excellent bratwurst in <a href="http://www.bobpusateri.com/archive/2012/04/sql-saturday-118-wisconsin-style/" target="_blank">Wisconsin</a>. </p>
<p><a href="http://thisisgonnabegood.blogspot.com/2010/08/italian-beef-at-portillos-chicago.html" target="_blank"><img style=' float: right; padding: 4px; margin: 0 0 2px 7px;'  alt="Beef" src="http://img.bobpusateri.com/bc/2012/05/Beef.jpg" class="alignright" width="400" height="300" /></a>This year I&#8217;m happy to announce that lunch for SQL Saturday Chicago will be <a href="http://www.portillos.com/portillos/" target="_blank">Portillo&#8217;s</a>! We&#8217;ll have Italian Beef sandwiches, Mostaccioli, and Grilled Veggie Sandwiches for those who have requested a vegetarian option. Be sure to bring your appetite!</p>
<p>Also if you haven&#8217;t already seen, our <a href="http://sqlsaturday.com/119/schedule.aspx" target="_blank">schedule</a> has been posted! We have some excellent speakers lined up. Now is a great time to start thinking about what sessions you&#8217;d like to attend.</p>
<p><strong>Pre-Cons</strong><br />
If you&#8217;re looking to extend your weekend a bit, we have two excellent pre-cons lined up for Friday, May 18:</p>
<ul>
<li>Rob Farley (<a href="http://sqlblog.com/blogs/rob_farley/" target="_blank">blog</a> | <a href="http://twitter.com/#!/rob_Farley" target="_blank">@Rob_Farley</a>) is offering <a href="http://wendyverse.blogspot.com/2012/04/sql-saturday-pre-con-t-sql-in-sql-2012.html" target="_blank">T-SQL in SQL 2012 &#8211; new skills for a new exam</a></li>
<li>Allan Hirt (<a href="http://www.sqlha.com/blog/" target="_blank">blog</a> | <a href="http://twitter.com/#!/sqlha" target="_blank">@SQLHA</a>) and Ben DeBow (<a href="http://www.sqlha.com/blog/" target="_blank">blog</a> | <a href="http://twitter.com/#!/BBQSQL" target="_blank">@BBQSQL</a>) of <a href="http://www.sqlha.com/" target="_blank">SQLHA</a> are presenting <a href="http://wendyverse.blogspot.com/2012/04/sql-saturday-pre-con-real-world-system.html" target="_blank">Real World System Design for the SQL Server DBA</a></li>
</ul>
<p>These pre-cons are priced at $99 each and can be booked by emailing sqlsaturday119@sqlsaturday.com.</p>
<p>We&#8217;re looking forward to another wonderful event! Can&#8217;t wait to see you there in two weeks!</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/TheOuterJoin?a=R_Cy5MDiLWU:HJ0BMeZWA_w:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/TheOuterJoin?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/TheOuterJoin?a=R_Cy5MDiLWU:HJ0BMeZWA_w:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/TheOuterJoin?i=R_Cy5MDiLWU:HJ0BMeZWA_w:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/TheOuterJoin/~4/R_Cy5MDiLWU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.bobpusateri.com/archive/2012/05/sql-saturday-119-update/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Compression Estimates That Don’t Make Sense</title>
		<link>http://www.bobpusateri.com/archive/2012/04/compression-estimates-that-dont-make-sense/</link>
		<comments>http://www.bobpusateri.com/archive/2012/04/compression-estimates-that-dont-make-sense/#comments</comments>
		<pubDate>Thu, 26 Apr 2012 15:59:34 +0000</pubDate>
		<dc:creator>Bob Pusateri</dc:creator>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQLServerPedia Syndication]]></category>

		<guid isPermaLink="false">http://www.bobpusateri.com/?p=734</guid>
		<description><![CDATA[<p>&#8220;Statistics means never having to say you&#8217;re certain&#8221; is a well-known quote that would often come up in my AP Statistics class back in high school. The same can be implied for estimation, and while estimates need not be perfect, they should at least be logical. While estimating the effects of compressing data I recently [...]]]></description>
			<content:encoded><![CDATA[<p>&#8220;Statistics means never having to say you&#8217;re certain&#8221; is a well-known quote that would often come up in my AP Statistics class back in high school. The same can be implied for estimation, and while estimates need not be perfect, they should at least be logical. While estimating the effects of compressing data I recently came across a behavior that I don&#8217;t think Mr. Spock would approve of.</p>
<p>The <a href="http://msdn.microsoft.com/en-us/library/cc280574.aspx" target="_blank">sp_estimate_data_compression_savings</a> procedure is an excellent tool for estimating how compression will affect an index or partition. It works by sampling 5% of the appropriate pages and applies the desired level of compression on them in TempDB. The results are then extrapolated to give an estimated size for the entire index/partition with that level of compression applied. It&#8217;s not perfect, but again it&#8217;s an estimate. I recently found however that depending on the datatypes present in the table, that estimate can get very bad. I noticed this in SQL Server 2008R2, but it also shows up in 2012.</p>
<p>For this demo, you&#8217;ll need the AdventureWorks database or one of its variants. I used <a href="http://msftdbprodsamples.codeplex.com/releases/view/59211" target="_blank">AdventureWorks2008R2</a> and <a href="http://msftdbprodsamples.codeplex.com/releases/view/55330" target="_blank">AdventureWorks2012</a> in my tests. You&#8217;ll also need tables a bit larger than AdventureWorks provides, so I use <a href="http://sqlblog.com/blogs/adam_machanic/archive/2011/10/17/thinking-big-adventure.aspx" target="_blank">Adam Machanic&#8217;s bigAdventure script</a> to create the dbo.bigTransactionHistory table we&#8217;ll be working with.</p>
<p>Once dbo.bigTransactionHistory is set up, we&#8217;re going to focus on it&#8217;s nonclustered index which is created in the script along with the table. Let&#8217;s rebuild this index with a fill factor of 100 so there&#8217;s as little fragmentation as possible.</p>
<pre class="brush: sql; title: ; notranslate">
ALTER INDEX IX_ProductID_TransactionDate ON dbo.bigTransactionHistory
REBUILD WITH (FILLFACTOR=100);
</pre>
<p>Now check the estimated size of it using all 3 compression settings: NONE, ROW, and PAGE.</p>
<pre class="brush: sql; title: ; notranslate">
EXEC sp_estimate_data_compression_savings 'dbo','bigTransactionHistory', 2, NULL, NONE;

EXEC sp_estimate_data_compression_savings 'dbo','bigTransactionHistory', 2, NULL, ROW;

EXEC sp_estimate_data_compression_savings 'dbo','bigTransactionHistory', 2, NULL, PAGE;
</pre>
<p>(Click to enlarge)<br />
<a href="http://img.bobpusateri.com/bc/2012/04/Compress1.png" target="_blank"><img style=' display: block; margin-right: auto; margin-left: auto;'  alt="Screenshot1" src="http://img.bobpusateri.com/bc/2012/04/Compress1_sm.jpg" class="aligncenter" width="550" height="208" /></a></p>
<p>The index is currently not compressed, and you can see that the first result set&#8217;s estimated size (with no compression) is close to the current size. It won&#8217;t be exactly the same and your values will vary, but the main idea here is that using no compression gives an estimate closest to the current value and row and page compression yield smaller values yet.</p>
<p>Now let&#8217;s change things up by adding another column to bigTransactionHistory and giving it a value:</p>
<pre class="brush: sql; title: ; notranslate">
ALTER TABLE dbo.bigTransactionHistory ADD vbm VARBINARY(MAX) NULL;

UPDATE dbo.bigTransactionHistory SET vbm = CONVERT(VARBINARY(MAX), '0xAB');
</pre>
<p>Then check the estimated sizes again just like before:</p>
<pre class="brush: sql; title: ; notranslate">
EXEC sp_estimate_data_compression_savings 'dbo','bigTransactionHistory', 2, NULL, NONE;

EXEC sp_estimate_data_compression_savings 'dbo','bigTransactionHistory', 2, NULL, ROW;

EXEC sp_estimate_data_compression_savings 'dbo','bigTransactionHistory', 2, NULL, PAGE;
</pre>
<p><a href="http://img.bobpusateri.com/bc/2012/04/Compress2.png" target="_blank"><img style=' display: block; margin-right: auto; margin-left: auto;'  alt="Screenshot2" src="http://img.bobpusateri.com/bc/2012/04/Compress2_sm.jpg" class="aligncenter" width="550" height="214" /></a></p>
<p>Look at that first result (with no compression) &#8211; it&#8217;s now way smaller than the current size. It&#8217;s actually even smaller than the estimated sizes for row and page compression, and it all seems to be due to the VARBINARY(MAX) column. If you remove that column and rebuild the table, the estimated size with no compression will be back to where it should be.</p>
<p>Strange, huh? I can only assume this has something to do with VARBINARY being a type that doesn&#8217;t get compressed, but I don&#8217;t see how that should affect the estimation. </p>
<p>BOL states that <em>&#8220;If the requested compression setting is same as the current compression setting, the stored procedure will return the estimated size with no data fragmentation and using the existing fill factor.&#8221;</em> I can&#8217;t see the assumption of no fragmentation being responsible for the estimated size shrinking so much and being smaller than the estimates using compression. Compression can increase the size of an object in certain cases, but the differences here are just too great.</p>
<p>I have submitted this on <a href="https://connect.microsoft.com/SQLServer/feedback/details/739050/sp-estimate-data-compression-savings-produces-unreasonable-estimates-when-requested-compression-setting-is-same-as-the-current-setting" target="_blank">MS Connect</a> &#8211; feel free to vote up if you can reproduce it!</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/TheOuterJoin?a=WzEXttg5x54:ofLKCnXgYEE:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/TheOuterJoin?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/TheOuterJoin?a=WzEXttg5x54:ofLKCnXgYEE:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/TheOuterJoin?i=WzEXttg5x54:ofLKCnXgYEE:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/TheOuterJoin/~4/WzEXttg5x54" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.bobpusateri.com/archive/2012/04/compression-estimates-that-dont-make-sense/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SQL Saturday #118: Wisconsin-Style!</title>
		<link>http://www.bobpusateri.com/archive/2012/04/sql-saturday-118-wisconsin-style/</link>
		<comments>http://www.bobpusateri.com/archive/2012/04/sql-saturday-118-wisconsin-style/#comments</comments>
		<pubDate>Tue, 24 Apr 2012 12:38:00 +0000</pubDate>
		<dc:creator>Bob Pusateri</dc:creator>
				<category><![CDATA[Speaking]]></category>
		<category><![CDATA[SQL Saturday]]></category>

		<guid isPermaLink="false">http://www.bobpusateri.com/?p=732</guid>
		<description><![CDATA[<p>This past weekend I was very fortunate to be able to attend and speak at SQL Saturday #118 in Madison, Wisconsin. This was a top-notch event; all the hard work and planning that went into it really showed in how smoothly things ran.</p>
<p>My trip began around noon on Friday, which was a great decision because [...]]]></description>
			<content:encoded><![CDATA[<p>This past weekend I was very fortunate to be able to attend and speak at <a href="http://sqlsaturday.com/118/eventhome.aspx" target="_blank">SQL Saturday #118</a> in Madison, Wisconsin. This was a top-notch event; all the hard work and planning that went into it really showed in how smoothly things ran.</p>
<p>My trip began around noon on Friday, which was a great decision because I hit no traffic at all on the way up there. I checked into the <a href="http://www.cpmadisonhotel.com/" target="_blank">Crowne Plaza Madison</a> and ended up with a little time to kill before heading out to help set things up. The hotel was excellent, featuring a pool and free wi-fi that was surprisingly fast. I&#8217;ve been gouged at other hotels for a much slower connection!</p>
<p><img style=' float: right; padding: 4px; margin: 0 0 2px 7px;'  alt="SQLCow" src="http://img.bobpusateri.com/bc/2012/04/sqlcow.jpg" class="alignright" width="350" height="337" />A large group of volunteers converged on the venue around 4pm Friday to help with setup, stuff goodie bags, and make sure everything was ready to go. So many showed up that things got done significantly faster than planned, meaning more downtime before the speaker dinner started. Downtime&#8217;s never a bad thing at these events though &#8211; we all hung out at <a href="http://aleasylum.com/" target="_blank">Ale Asylum</a>, a brew pub with some very tasty beer!</p>
<p>The speaker dinner was held at <a href="http://www.benvenutos.com/" target="_blank">Benvenuto&#8217;s Italian Grill</a>, where much merriment was had, along with some excellent Italian food. Afterwards a lot of us headed back to the hotel bar before turning in for the night.</p>
<p>Doors opened for registration at 7:00 the next morning. The event was held at <a href="http://matcmadison.edu/" target="_blank">Madison Area Technical College</a>, which was a terrific venue. There was excellent classroom space featuring large projector screens, plenty of desk space for laptops, and most rooms had tiered seating to help with visibility. The hallways were wide and there was plenty of open spaces to mingle and network with others. Much like the hotel, it also featured some impressively fast wi-fi.</p>
<p>My session, where I talked about data compression, was at 8:00 am &#8211; the first timeslot of the day. This was fine with me as I am very much a morning person. Not only was I awake and ready to go, but I had a pretty lively crowd of attendees that were eager to get the day started as well. My presentation filled the 75 minute timeslot perfectly, with enough time for some great questions afterwards.</p>
<p>Lunch was a delicious Wisconsin picnic featuring bratwurst, hamburgers, baked beans, potato salad, and cookies for dessert. To facilitate conversation on specific topics, this was a &#8220;Cows of a Spot&#8221; lunch, where speakers were assigned to specific tables marked with topics and attendees could come with their questions. I manned a table on performance and had some great conversations with those who stopped by.</p>
<p>The sessions themselves appeared very well-organized, and those I attended personally were of excellent quality. I was particularly impressed by how room monitors were assigned to each room and evaluation forms were given to speakers immediately following their session. Of all the SQL Saturdays I&#8217;ve spoken at this was the first time I&#8217;ve gotten to see my evaluations. I can remember one where the evaluation forms got lost before we got them, and another where it wasn&#8217;t communicated that speakers had to come pick them up so they were thrown out instead. Giving the forms to the speaker immediately following the session eliminated any confusion and made sure the evals got in the right hands as quickly as possible.</p>
<p>After a full day of training, closing ceremonies and the highly anticipated raffle drawings took place. There were some great prizes, including many books, Amazon Kindles, and even a HP Mini! The after party was held at <a href="http://www.wilsonssportsbarandgrill.com/" target="_blank">Wilson&#8217;s Sports Bar</a> across town. Unfortunately I don&#8217;t have a whole lot to say about this, as I left for home shortly after it started. I&#8217;m sure an amazing time was had by all, and you&#8217;ll be able to find blog posts by others who stayed.</p>
<p>All in all I thought this was an excellent event. While it was the first SQL Saturday in Wisconsin, it sure felt like it was put on by a bunch of seasoned pros. Many thanks to the organizing team, which consisted of Jes Borland (<a href="http://blogs.lessthandot.com/index.php?disp=authdir&#038;author=420" target="_blank">blog</a> | <a href="http://twitter.com/#!/grrl_geek" target="_blank">@grrl_geek</a>), Ted Krueger (<a href="http://blogs.lessthandot.com/index.php?disp=authdir&#038;author=68" target="_blank">blog</a> | <a href="http://twitter.com/#!/onpnt" target="_blank">@onpnt</a>), Gina Meronek (<a href="http://twitter.com/#!/equerystrian" target="_blank">@equerystrian</a>), Leonard Murphy (<a href="http://www.leonardmurphy.com/" target="_blank">blog</a> | <a href="http://twitter.com/#!/phonetictalk" target="_blank">@phonetictalk</a>), and the <a href="http://www.madpass.org/" target="_blank">MADPASS</a> Board: Tim Benninghoff (<a href="http://timbenninghoff.com/" target="_blank">blog</a>), Matt Cherwin (<a href="http://twitter.com/#!/control_group" target="_blank">@control_group</a>), Tony Sebion (<a href="http://twitter.com/#!/tonysebion" target="_blank">@tonysebion</a>), and Steve Novoselac (<a href="http://blog.stevienova.com/" target="_blank">blog</a> | <a href="http://twitter.com/#!/scaleovenstove" target="_blank">@scaleovenstove</a>). Also a huge thanks to the <a href="http://sqlsaturday.com/118/sponsors.aspx" target="_blank">sponsors</a> &#8211; without their support it wouldn&#8217;t have been possible.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/TheOuterJoin?a=9S1YFPMPalE:98b3M_e0TcE:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/TheOuterJoin?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/TheOuterJoin?a=9S1YFPMPalE:98b3M_e0TcE:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/TheOuterJoin?i=9S1YFPMPalE:98b3M_e0TcE:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/TheOuterJoin/~4/9S1YFPMPalE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.bobpusateri.com/archive/2012/04/sql-saturday-118-wisconsin-style/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Preventing SSRS From Changing Text Size</title>
		<link>http://www.bobpusateri.com/archive/2012/04/preventing-ssrs-from-changing-text-size/</link>
		<comments>http://www.bobpusateri.com/archive/2012/04/preventing-ssrs-from-changing-text-size/#comments</comments>
		<pubDate>Thu, 12 Apr 2012 12:45:02 +0000</pubDate>
		<dc:creator>Bob Pusateri</dc:creator>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQLServerPedia Syndication]]></category>
		<category><![CDATA[SSRS]]></category>

		<guid isPermaLink="false">http://www.bobpusateri.com/?p=729</guid>
		<description><![CDATA[<p>Every once in a while I find myself building a report in SQL Server Reporting Services. I know my way around SSRS enough to get a report looking the way I like, but I&#8217;m definitely not an expert in the subject. While developing a report recently I noticed some very strange behavior that I have [...]]]></description>
			<content:encoded><![CDATA[<p>Every once in a while I find myself building a report in SQL Server Reporting Services. I know my way around SSRS enough to get a report looking the way I like, but I&#8217;m definitely not an expert in the subject. While developing a report recently I noticed some very strange behavior that I have a hard time believing is intended: SSRS is changing font sizes on me depending on what I&#8217;m viewing! I&#8217;m happy to provide screenshots and instructions to reproduce this behavior, and also the solutions I found. If you&#8217;re curious, I first observed this in SQL Server 2008 R2 SP1 CU2 (10.50.2772), though I&#8217;m guessing it appears in earlier builds as well. It is still present in the latest build, SQL Server 2008 R2 SP1 CU5 (10.50.2806).</p>
<p>Let&#8217;s start off by creating a very simple table about <strike>soda</strike> <strike>pop</strike> soft drinks in a test database (mine is named &#8220;Sandbox&#8221;) and fill it with some data:</p>
<pre class="brush: sql; title: ; notranslate">
USE [Sandbox]
GO

CREATE TABLE [dbo].[SoftDrinks](
	[Name] [varchar](50) NOT NULL PRIMARY KEY,
	[Style] [varchar](50) NOT NULL,
	[CaffeineLevel] [varchar](10) NULL
);
GO

INSERT INTO [dbo].[SoftDrinks] VALUES (N'50/50', N'Citrus', NULL);
INSERT INTO [dbo].[SoftDrinks] VALUES (N'7 Up', N'Citrus', NULL);
INSERT INTO [dbo].[SoftDrinks] VALUES (N'Coca-Cola Classic', N'Cola', N'Medium');
INSERT INTO [dbo].[SoftDrinks] VALUES (N'Diet Pepsi', N'Diet', N'Medium');
INSERT INTO [dbo].[SoftDrinks] VALUES (N'Diet Rite', N'Diet', N'Medium');
INSERT INTO [dbo].[SoftDrinks] VALUES (N'Jolt', N'Cola', N'High');
INSERT INTO [dbo].[SoftDrinks] VALUES (N'Mello Yello', N'Citrus', N'High');
INSERT INTO [dbo].[SoftDrinks] VALUES (N'Mountain Dew', N'Citrus', N'High');
INSERT INTO [dbo].[SoftDrinks] VALUES (N'Pepsi', N'Cola', N'Medium');
INSERT INTO [dbo].[SoftDrinks] VALUES (N'RC Cola', N'Cola', N'Medium');
</pre>
<p>Selecting from the table should now get you this:<br />
<img style=' display: block; margin-right: auto; margin-left: auto;'  alt="Query Result" src="http://img.bobpusateri.com/bc/2012/04/SoftDrinksTable.png" class="aligncenter" width="307" height="323" /></p>
<p>I should add that the values in the CaffeineLevel column are completely made up. I just wanted a few different values with some NULLs mixed in.</p>
<p>Now that the table is set up, we need a report. To briefly describe the report I created, I&#8217;m using the List object with text boxes for Name and CaffeineLevel in the detail section. The report is grouped by Style and the groups are expandable and closed by default. The name of each group also displays a count of the number of records it contains. (Click to enlarge).<br />
<a href="http://img.bobpusateri.com/bc/2012/04/VisualStudio.png" target="_blank"><img style=' display: block; margin-right: auto; margin-left: auto;'  alt="Visual Studio" src="http://img.bobpusateri.com/bc/2012/04/VisualStudio_sm.png" class="aligncenter" width="400" height="238" /></a></p>
<p>To make things a bit quicker, you can <a href="http://img.bobpusateri.com/bc/2012/04/SoftDrinksProject.zip" target="_blank">download the report project here</a>. It&#8217;s setup to use Windows authentication to connect to the Sandbox database on localhost. You may need to make adjustments to the connection information depending on your test environment. I wasn&#8217;t able to observe this behavior when previewing in Business Intelligence Development Studio, so you will need to deploy it to a report server.</p>
<p>Once the report is deployed, run it and you should see the 3 Style values with counts, however the details aren&#8217;t visible:<br />
<a href="http://img.bobpusateri.com/bc/2012/04/Report1.png" target="_blank"><img style=' display: block; margin-right: auto; margin-left: auto;'  alt="Report" src="http://img.bobpusateri.com/bc/2012/04/Report1_sm.png" class="aligncenter" width="400" height="383" /></a></p>
<p>Open the Cola and Diet groups and you&#8217;ll see the values for Name and CaffeineLevel. Everything looks fine, right?<br />
<a href="http://img.bobpusateri.com/bc/2012/04/Report3.png" target="_blank"><img style=' display: block; margin-right: auto; margin-left: auto;'  alt="Report" src="http://img.bobpusateri.com/bc/2012/04/Report3_sm.png" class="aligncenter" width="400" height="383" /></a></p>
<p>Now open the Citrus group. Notice how the size of the text in the CaffeineLevel column shrinks?<br />
<a href="http://img.bobpusateri.com/bc/2012/04/Report4.png" target="_blank"><img style=' display: block; margin-right: auto; margin-left: auto;'  alt="Report" src="http://img.bobpusateri.com/bc/2012/04/Report4_sm.png" class="aligncenter" width="400" height="383" /></a></p>
<p>Closing the Citrus group will return the text sizes for the other groups to normal. For fun, let&#8217;s try this again with a non-null value for the first row of the CaffeineLevel column. Add another row to the SoftDrinks table:</p>
<pre class="brush: sql; title: ; notranslate">
INSERT [dbo].[SoftDrinks] ([Name], [Style], [CaffeineLevel])
VALUES (N'123_NotNull', N'Citrus', N'Low');
</pre>
<p>Refresh the report and open all groups. You&#8217;ll see the font size doesn&#8217;t change, which should be expected.<br />
<a href="http://img.bobpusateri.com/bc/2012/04/Report6.png" target="_blank"><img style=' display: block; margin-right: auto; margin-left: auto;'  alt="Report" src="http://img.bobpusateri.com/bc/2012/04/Report6_sm.png" class="aligncenter" width="400" height="383" /></a></p>
<p>It appears that the cause of this is related to the top value in the column. If the top value is null, the font size gets smaller.</p>
<p><strong>Solutions</strong></p>
<p>I found a couple of ways to resolve this. The first is to remove the NULL values from the CaffeineLevel column by adjusting the query. I used the <code>ISNULL()</code> function and tried replacing the NULL values with an empty string, but that had no effect. Replacing null values with a single space did fix the problem, however.</p>
<pre class="brush: sql; title: ; notranslate">
SELECT
   Name,
   Style,
   --CaffeineLevel -- (The original query)
   --ISNULL(CaffeineLevel,'') AS CaffeineLevel -- (This doesn't work)
   ISNULL(CaffeineLevel,' ') AS CaffeineLevel -- (This works)
FROM dbo.SoftDrinks;
</pre>
<p>Another solution is to filter out the NULL values by using an expression in SSRS. For this I used the <code>IsNothing()</code> function to replace NULL values with a string containing a single space, which resolved the issue. Much like above, replacing NULL values with an empty string had no effect. The expression I used was:<br />
<code>=IIF(IsNothing(Fields!CaffeineLevel.Value)," ",Fields!CaffeineLevel.Value)</code></p>
<p>Whichever of the above you choose, you&#8217;ll arive at the correct (and visually pleasing) result of having the font sizes be the same:<br />
<a href="http://img.bobpusateri.com/bc/2012/04/Report5.png" target="_blank"><img style=' display: block; margin-right: auto; margin-left: auto;'  alt="Report" src="http://img.bobpusateri.com/bc/2012/04/Report5_sm.png" class="aligncenter" width="400" height="383" /></a></p>
<p>Personally I prefer to alter the query rather than add an SSRS expression, as I am not a fan of seeing &lt;&lt;expr&gt;&gt; in report definitions when it&#8217;s not truly necessary. </p>
<p>If anyone else has encountered this situation, I hope you find this solution helpful!</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/TheOuterJoin?a=WRYIA8naSmM:fF9YhyxqBPs:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/TheOuterJoin?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/TheOuterJoin?a=WRYIA8naSmM:fF9YhyxqBPs:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/TheOuterJoin?i=WRYIA8naSmM:fF9YhyxqBPs:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/TheOuterJoin/~4/WRYIA8naSmM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.bobpusateri.com/archive/2012/04/preventing-ssrs-from-changing-text-size/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SQLFriends: A Different Kind of Gathering</title>
		<link>http://www.bobpusateri.com/archive/2012/03/sqlfriends-a-different-kind-of-gathering/</link>
		<comments>http://www.bobpusateri.com/archive/2012/03/sqlfriends-a-different-kind-of-gathering/#comments</comments>
		<pubDate>Mon, 26 Mar 2012 13:03:38 +0000</pubDate>
		<dc:creator>Bob Pusateri</dc:creator>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQLServerPedia Syndication]]></category>
		<category><![CDATA[Community]]></category>
		<category><![CDATA[SQLFriends]]></category>

		<guid isPermaLink="false">http://www.bobpusateri.com/?p=727</guid>
		<description><![CDATA[<p>Imagine you had the chance to get together with other data professionals in your area in a setting outside of a training session or user group meeting. There&#8217;s no formal agenda, just an excellent meal and some great conversation. Perhaps a respected expert is available to answer questions and bounce ideas off of. Does this [...]]]></description>
			<content:encoded><![CDATA[<p>Imagine you had the chance to get together with other data professionals in your area in a setting outside of a training session or user group meeting. There&#8217;s no formal agenda, just an excellent meal and some great conversation. Perhaps a respected expert is available to answer questions and bounce ideas off of. Does this sound appealing? If so, you should check out <a href="http://sqlfriends.org/" target="_blank">SQLFriends</a>.</p>
<p><strong>This past Friday I had the pleasure of attending the first-ever SQLFriends event! </strong></p>
<p>SQLFriends is the brainchild of Aaron Lowe (<a href="http://www.aaronlowe.net/" target="_blank">blog</a> | <a href="http://twitter.com/#!/vendoran" target="_blank">@Vendoran</a>) who, as he described it, wanted to come up with a SQL Server community event based around networking instead of training. Events such as SQL Saturdays and conferences are a great source of training, but many people look forward to the social and networking aspects as well. So why not just have an event focused around networking? SQLFriends was created to fill that void.</p>
<p>The first SQLFriends event was a sell-out lunch at <a href="http://www.bucadibeppo.com/" target="_blank">Buca di Beppo</a> in Chicago with 30 attendees and special guest Brent Ozar (<a href="http://www.brentozar.com/" target="_blank">blog</a> | <a href="http://twitter.com/#!/brento" target="_blank">@BrentO</a>). Brent answered all kinds of questions about training, certification, consulting, and anything else we could come up with. There was also the opportunity to network amongst ourselves and meet some new faces. Several attendees mentioned how happy they were to meet at lunchtime because they can&#8217;t fit evening user group meetings into their schedule.</p>
<p>All in all I&#8217;d say the inaugural SQLFriends lunch was a great success. Thank you very much to Aaron for putting it together. If you&#8217;d like to find out about future events, head on over to their website at <a href="http://sqlfriends.org/" target="_blank">http://sqlfriends.org/</a> or follow them on Twitter at <a href="http://twitter.com/#!/sqlfriends" target="_blank">@SQLFriends</a>.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/TheOuterJoin?a=NFHCUB4pDno:CqskZxj0F1U:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/TheOuterJoin?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/TheOuterJoin?a=NFHCUB4pDno:CqskZxj0F1U:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/TheOuterJoin?i=NFHCUB4pDno:CqskZxj0F1U:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/TheOuterJoin/~4/NFHCUB4pDno" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.bobpusateri.com/archive/2012/03/sqlfriends-a-different-kind-of-gathering/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Speaking at SQL Saturday #118: Wisconsin 2012</title>
		<link>http://www.bobpusateri.com/archive/2012/03/speaking-at-sql-saturday-118-wisconsin-2012/</link>
		<comments>http://www.bobpusateri.com/archive/2012/03/speaking-at-sql-saturday-118-wisconsin-2012/#comments</comments>
		<pubDate>Wed, 21 Mar 2012 12:45:18 +0000</pubDate>
		<dc:creator>Bob Pusateri</dc:creator>
				<category><![CDATA[Speaking]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQLServerPedia Syndication]]></category>
		<category><![CDATA[Upcoming Presentations]]></category>

		<guid isPermaLink="false">http://www.bobpusateri.com/?p=726</guid>
		<description><![CDATA[<p>I feel very fortunate to have been chosen as a speaker for SQL Saturday #118 in Wisconsin on April 21, 2012. After an excellent time speaking at MADPASS in February, I&#8217;m really looking forward to getting back to Madison for this event!</p>
<p>I&#8217;ll be giving my presentation entitled The Skinny on Data Compression which covers the [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://sqlsaturday.com/118/eventhome.aspx" target="_blank"><img style=' float: right; padding: 4px; margin: 0 0 2px 7px;'  alt="SQL Saturday 118" src="http://img.bobpusateri.com/bc/2012/03/sqlsat118_web.png" class="alignright" width="236" height="115" /></a>I feel very fortunate to have been chosen as a speaker for <a href="http://sqlsaturday.com/118/eventhome.aspx" target="_blank">SQL Saturday #118</a> in Wisconsin on April 21, 2012. After an <a href="http://www.bobpusateri.com/archive/2012/02/madpass-february-2012-roundup/" target="_blank">excellent time</a> speaking at <a href="http://www.madpass.org/" target="_blank">MADPASS</a> in February, I&#8217;m really looking forward to getting back to Madison for this event!</p>
<p>I&#8217;ll be giving my presentation entitled <strong>The Skinny on Data Compression</strong> which covers the different types of data compression available in SQL Server and some of the details behind how they work. I&#8217;ll also talk about the pros and cons of compressing data and how to determine which flavor of compression is most appropriate for an object. This presentation was very popular in <a href="http://www.bobpusateri.com/archive/2011/11/sql-saturday-101-wrap-up/" target="_blank">Kansas City</a> and I&#8217;m expecting more of the same up North next month!</p>
<p>Registration is still open as of when this post went live, so if you&#8217;d like to attend <a href="http://sqlsaturday.com/118/register.aspx" target="_blank">please sign up here</a>. If you&#8217;re on twitter, follow the <a href="https://twitter.com/#!/search/%23sqlsat118" target="_blank">#sqlsat118</a> hashtag for the latest information.</p>
<p>I can&#8217;t wait to head to up Madison. Hope to see you there!</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/TheOuterJoin?a=r4CpFe0KJ_c:gOzIeOsE7W8:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/TheOuterJoin?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/TheOuterJoin?a=r4CpFe0KJ_c:gOzIeOsE7W8:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/TheOuterJoin?i=r4CpFe0KJ_c:gOzIeOsE7W8:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/TheOuterJoin/~4/r4CpFe0KJ_c" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.bobpusateri.com/archive/2012/03/speaking-at-sql-saturday-118-wisconsin-2012/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>T-SQL and B-Ball: My 2012 NCAA Bracket</title>
		<link>http://www.bobpusateri.com/archive/2012/03/t-sql-and-b-ball-my-2012-ncaa-bracket/</link>
		<comments>http://www.bobpusateri.com/archive/2012/03/t-sql-and-b-ball-my-2012-ncaa-bracket/#comments</comments>
		<pubDate>Wed, 14 Mar 2012 13:34:34 +0000</pubDate>
		<dc:creator>Bob Pusateri</dc:creator>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQLServerPedia Syndication]]></category>

		<guid isPermaLink="false">http://www.bobpusateri.com/?p=725</guid>
		<description><![CDATA[<p>March Madness is once again upon us, which means it&#8217;s time for one of the biggest time sinks of the year: filling out a bracket for the pseudo-sanctioned office NCAA pool. Along with the superbowl, this is a hallowed time when bosses turn a blind eye to all the cash that seems to be heading [...]]]></description>
			<content:encoded><![CDATA[<p>March Madness is once again upon us, which means it&#8217;s time for one of the biggest time sinks of the year: filling out a bracket for the pseudo-sanctioned office NCAA pool. Along with the superbowl, this is a hallowed time when bosses turn a blind eye to all the cash that seems to be heading towards that person who has been designated as both trustworthy enough to manage the pool and cool enough to forget that gambling is against company policy.</p>
<p>Super Bowl pools are usually pretty easy &#8211; pick a square (or two or three), hand over the cash, and the numbers get filled in later. Building an NCAA bracket on the other hand is a lot of work. Even when picking winners completely at random there are over 60 choices to make. For someone like myself who doesn&#8217;t watch nearly enough basketball to make educated guesses about most of the teams it&#8217;s a lot of wasted effort. I&#8217;d rather spend my time doing something more constructive, such as developing a formula in T-SQL to make my bracket picks for me. Much like <a href="http://www.bobpusateri.com/archive/2011/03/t-sql-and-the-big-d520/" target="_blank">last year</a> I&#8217;ve done it again.</p>
<p>This year&#8217;s bracket is based on 2 things. The first is the idea that a #16 seed team will never beat a #1 seed team. (Since it&#8217;s <a href="http://en.wikipedia.org/wiki/NCAA_Men%27s_Division_I_Basketball_Championship#Best_performances_by_.2316_seeds" target="_blank">never happened yet</a> it seems like a safe bet). After that, game winners are determined by a formula.</p>
<p>All teams in the tournament are searched in Bing twice according to the following template:<br />
<code>&lt;School Name&gt; &lt;Team Name&gt; Basketball rocks<br />
&lt;School Name&gt; &lt;Team Name&gt; Basketball sucks</code></p>
<p>For example:<br />
&#8220;Illinois Fighting Illini Basketball rocks&#8221;<br />
and<br />
&#8220;Michigan Wolverines Basketball sucks&#8221;<br />
would both be valid queries.</p>
<p>The total number of results returned by Bing for each query are recorded in a table, and to represent a game the following values will be compared for teams A and B:<br />
<code>Team A: A.rocks / B.sucks<br />
Team B: B.rocks / A.sucks</code></p>
<p>The team with the higher value wins the game.</p>
<p>One flaw in last year&#8217;s formula was that it generated a value for each school which never changed. This meant the school with the highest generated value would be the one to win the championship. This time around the outcome differs based on the teams that are compared, which makes things much more interesting. Here&#8217;s the bracket that resulted (click to enlarge).<br />
<a href="http://img.bobpusateri.com/bc/2012/03/Bracket.png" target="_blank"><img style=' display: block; margin-right: auto; margin-left: auto;'  alt="Bracket" src="http://img.bobpusateri.com/bc/2012/03/BracketSmall.jpg" class="aligncenter" width="600" height="427" /></a></p>
<p>If you&#8217;d like to try this yourself you can <a href="http://img.bobpusateri.com/bc/2012/03/2012BracketCode.zip" target="_blank">download the code here</a>. Since search results are constantly changing, you&#8217;ll likely have a different outcome than I did. Also be forewarned that while this code does work, it was put together very quickly and is neither elegant nor efficient.</p>
<p><strong>Why Bing?</strong><br />
In case you&#8217;re curious, I decided to use Bing search instead of Google because I&#8217;m a tightwad and it turns out <a href="http://code.google.com/apis/customsearch/v1/overview.html" target="_blank">Google&#8217;s Search API</a> isn&#8217;t free. If you want to make more than 100 queries per day on Google, you need to pay. Since I needed to make over 100 queries to gather my data plus a few extra during development I went with <a href="http://www.bing.com/developers/s/APIBasics.html" target="_blank">Bing</a>, which has a much friendlier policy of restricting your query rate instead of limiting the total number of queries per day.</p>
<p>Enjoy the tournament! Should you use my method and come up with a winning bracket, please contact me to discuss my share of the winnings.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/TheOuterJoin?a=IW8nQrBzw9o:90cP3Nsm2os:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/TheOuterJoin?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/TheOuterJoin?a=IW8nQrBzw9o:90cP3Nsm2os:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/TheOuterJoin?i=IW8nQrBzw9o:90cP3Nsm2os:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/TheOuterJoin/~4/IW8nQrBzw9o" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.bobpusateri.com/archive/2012/03/t-sql-and-b-ball-my-2012-ncaa-bracket/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>T-SQL Tuesday #28: Jack of All Trades or Master of None?</title>
		<link>http://www.bobpusateri.com/archive/2012/03/t-sql-tuesday-28-jack-of-all-trades-or-master-of-none/</link>
		<comments>http://www.bobpusateri.com/archive/2012/03/t-sql-tuesday-28-jack-of-all-trades-or-master-of-none/#comments</comments>
		<pubDate>Tue, 13 Mar 2012 12:45:00 +0000</pubDate>
		<dc:creator>Bob Pusateri</dc:creator>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[TSQL Tuesday]]></category>

		<guid isPermaLink="false">http://www.bobpusateri.com/?p=723</guid>
		<description><![CDATA[<p>This month&#8217;s T-SQL Tuesday is brought to us by newly-minted MCM Argenis Fernandez (blog &#124; @DBArgenis), who I had the pleasure of meeting in person for the first time a few weeks ago. Argenis is asking if we specialize or not, why we do (or don&#8217;t) specialize, and why we feel that&#8217;s a good thing.</p>
<p>For [...]]]></description>
			<content:encoded><![CDATA[<p>This month&#8217;s <a href="http://sqlblog.com/blogs/argenis_fernandez/archive/2012/03/05/t-sql-tuesday-028-jack-of-all-trades-master-of-none.aspx" target="_blank">T-SQL Tuesday</a> is brought to us by newly-minted MCM Argenis Fernandez (<a href="http://sqlblog.com/blogs/argenis_fernandez/default.aspx" target="_blank">blog</a> | <a href="http://twitter.com/#!/dbargenis" target="_blank">@DBArgenis</a>), who I had the pleasure of meeting in person for the first time a few weeks ago. Argenis is asking if we specialize or not, why we do (or don&#8217;t) specialize, and why we feel that&#8217;s a good thing.</p>
<p><a href="http://sqlblog.com/blogs/argenis_fernandez/archive/2012/03/05/t-sql-tuesday-028-jack-of-all-trades-master-of-none.aspx" target="_blank"><img style=' float: right; padding: 4px; margin: 0 0 2px 7px;'  alt="T-SQL Tuesday!" src="http://img.bobpusateri.com/bc/2010/06/TSQL2sDay150x150.jpg" title="T-SQL Tuesday!" class="alignright" width="150" height="150" /></a>For a very long time I&#8217;ve been interested in the internals of the database engine and how data gets stored on disk. Back in junior high and high school I spent a lot of time trying to do things like figure out how to extract data from MS Access files without actually opening Access. I never had a whole lot of success because I didn&#8217;t understand exactly what was going on (and I was almost always looking for values in plain text), but it never stopped me from trying. So long as there wasn&#8217;t any encryption involved I was convinced I could get my data out via other means, if only I knew everything about how it was stored. Unfortunately for me I didn&#8217;t have a whole lot of options for figuring that out at the time.</p>
<p>Fast forward to now where the internet is much more helpful, I&#8217;m part of an amazing community, and I have an income with which I can purchase books and other materials. I definitely consider myself to be a specialist in database engine internals, but I don&#8217;t feel like I&#8217;m a master and probably never will &#8211; I think there&#8217;s just too much going on to ever completely understand it all. The deeper I dig on a particular topic the more there is at a lower layer. I&#8217;m ok with all this because I think it&#8217;s nice to know there&#8217;s always something else to learn. And even if I did know everything, I certainly wouldn&#8217;t feel comfortable saying that.</p>
<p>Similarly I don&#8217;t consider myself to be a jack of all trades either. There&#8217;s an awful lot of SQL Server topics out there, some of which I&#8217;m just plain clueless about. That&#8217;s not to say I don&#8217;t want to learn them, just I&#8217;d rather concentrate at being the best I can be in other areas first. To me there&#8217;s more value in knowing a lot about a few things than knowing a little about many.</p>
<p>Is this a good or bad thing? I guess it depends. If I&#8217;m working on a project that can benefit from having some pretty in-depth knowledge of how the database engine works such as performance tuning or general DBA tasks, I think I have a lot to offer. If my assistance is needed for something like BI development, I&#8217;m much less useful. I&#8217;m not completely inept and can definitely fumble my way around, but anyone can sit at a piano and bang on the keys to make sounds come out. To make beautiful music takes a lot more skill and knowledge, and if you&#8217;re making beautiful music with a piano, a database, or anything else, you&#8217;re probably a specialist.</p>
<p>So to sum it all up, I believe I&#8217;m a specialist but not a master, and I believe that is very much preferable to being a jack of all trades. Thank you Argenis for the most excellent and thought-provoking topic!</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/TheOuterJoin?a=0Huu1KQiICU:EWXpdxcaJTs:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/TheOuterJoin?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/TheOuterJoin?a=0Huu1KQiICU:EWXpdxcaJTs:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/TheOuterJoin?i=0Huu1KQiICU:EWXpdxcaJTs:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/TheOuterJoin/~4/0Huu1KQiICU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.bobpusateri.com/archive/2012/03/t-sql-tuesday-28-jack-of-all-trades-or-master-of-none/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>MADPASS February 2012 Roundup</title>
		<link>http://www.bobpusateri.com/archive/2012/02/madpass-february-2012-roundup/</link>
		<comments>http://www.bobpusateri.com/archive/2012/02/madpass-february-2012-roundup/#comments</comments>
		<pubDate>Fri, 24 Feb 2012 14:06:58 +0000</pubDate>
		<dc:creator>Bob Pusateri</dc:creator>
				<category><![CDATA[Speaking]]></category>

		<guid isPermaLink="false">http://www.bobpusateri.com/?p=721</guid>
		<description><![CDATA[<p>This week I was very fortunate to speak at the February 2012 MADPASS user group meeting. I&#8217;ve seen lots of positive tweets about the group over the course of the past year and had been hoping to attend a meeting of theirs, so when I got the email a few months ago asking if I [...]]]></description>
			<content:encoded><![CDATA[<p>This week I was very fortunate to speak at the February 2012 <a href="http://www.madpass.org/" target="_blank">MADPASS</a> user group meeting. I&#8217;ve seen lots of positive tweets about the group over the course of the past year and had been hoping to attend a meeting of theirs, so when I got the email a few months ago asking if I would present I jumped at the chance.</p>
<p>I left Chicago around noon figuring I would give myself plenty of time to drive there, find my way if I got lost, and/or sit in traffic. I didn&#8217;t end up getting lost or hitting any traffic, so I ended up with a few hours to kill. Fortunately the building MADPASS meets in has this awesome room called &#8220;The Pub&#8221; which very much looks the part. I think my building needs one of these! I spent a few hours in there, got some work done via wi-fi and made sure my slide deck was in order.</p>
<p><div class="wp-caption alignright" style="width: 360px;  border: 1px solid #dddddd; background-color: #f3f3f3; padding-top: 4px; margin: 10px; text-align:center; float: right;"><img alt="The Pub" src="http://img.bobpusateri.com/bc/2012/02/ThePub.jpg" width="350" height="261" /><p style=' padding: 0 4px 5px; margin: 0;'  class="wp-caption-text">The Pub</p></div>MADPASS meetings aren&#8217;t held in the pub, though I understand the first one was because the pool table wasn&#8217;t there yet. Once the pool table was installed the meetings moved next door to a meeting room featuring cushy chairs and a fireplace. This is much different from any other presentation space I&#8217;ve seen since it doesn&#8217;t have a lectern or hard-wired projector, however the folks at MADPASS have a cart full of electronics with all the equipment necessary to present, webcast and record the meeting.</p>
<p>After the welcome and introductions, Jes Borland started off with a 30 minute version of her &#8220;Making Your Voice Heard&#8221; presentation on the benefits of raising your profile in the SQL Server community through twitter, forums, and blogs, and some tips and tricks to help accomplish that goal.</p>
<p>After Jes came food and networking. Dinner consisted of pizza, soft drinks, beer (we need this at the Chicago meetings!!) and birthday cake. February marks MADPASS&#8217; first birthday, and of course no birthday would be fun without some cake. Jes has a photo of it in <a href="http://blogs.lessthandot.com/index.php/ITProfessionals/ProfessionalDevelopment/madpass-s-first-birthday-they" target="_blank">her blog post</a> about the meeting.</p>
<p>I left dinner a little early to make sure all my equipment was setup to present, and it&#8217;s a good thing I did that because I ended up needing every second of that time and then some. Apparently I&#8217;m the first person they&#8217;ve had that&#8217;s given their presentation from a Mac and LiveMeeting didn&#8217;t want to play very nicely. I ended up getting started about 20 minutes later than planned and with screenshots recorded via a <a href="https://join.me/" target="_blank">join.me</a> session. I ended up running a bit long and rushing through the last few slides because I started late, but managed to get everything in. I hope everyone enjoyed it and learned a trick or two. I also got some really great questions afterwards. If you&#8217;re looking for the demo scripts I used, you can find the latest version of them along with other resource material <a href="http://www.bobpusateri.com/talks/backups/" target="_blank">here</a>.</p>
<p>I&#8217;d like to thank the MADPASS board: Tim Benninghoff (<a href="http://timbenninghoff.com/" target="_blank">blog</a>), Jes Borland (<a href="http://blogs.lessthandot.com/index.php/All/?disp=authdir&#038;author=420" target="_blank">blog</a> | <a href="http://twitter.com/#!/grrl_geek" target="_blank">@grrl_geek</a>), Matt Cherwin (<a href="http://twitter.com/#!/control_group" target="_blank">@control_group</a>), Steve Novoselac (<a href="http://blog.stevienova.com/" target="_blank">blog</a> | <a href="http://twitter.com/#!/scaleovenstove" target="_blank">@scaleovenstove</a>), and Tony Sebion (<a href="http://twitter.com/#!/tonysebion" target="_blank">@tonysebion</a>) for the opportunity to speak, and also <a href="http://www.confio.com/" target="_blank">Confio</a> for sponsoring the meeting and providing swag and raffle prizes.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/TheOuterJoin?a=fsbuw-HBRho:fWbOW-N229s:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/TheOuterJoin?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/TheOuterJoin?a=fsbuw-HBRho:fWbOW-N229s:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/TheOuterJoin?i=fsbuw-HBRho:fWbOW-N229s:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/TheOuterJoin/~4/fsbuw-HBRho" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.bobpusateri.com/archive/2012/02/madpass-february-2012-roundup/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss><!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using disk: enhanced

Served from: www.bobpusateri.com @ 2012-05-16 06:07:42 -->

