<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://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>Rob Farley : sqlbits</title><link>http://sqlblog.com/blogs/rob_farley/archive/tags/sqlbits/default.aspx</link><description>Tags: sqlbits</description><dc:language>en</dc:language><generator>CommunityServer 2.1 SP2 (Build: 61129.1)</generator><item><title>New PASS Summit speakers that deserve votes</title><link>http://sqlblog.com/blogs/rob_farley/archive/2011/05/19/new-pass-summit-speakers-that-deserve-votes.aspx</link><pubDate>Thu, 19 May 2011 03:35:25 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:35725</guid><dc:creator>Rob Farley</dc:creator><slash:comments>3</slash:comments><comments>http://sqlblog.com/blogs/rob_farley/comments/35725.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/rob_farley/commentrss.aspx?PostID=35725</wfw:commentRss><wfw:comment>http://sqlblog.com/blogs/rob_farley/rsscomments.aspx?PostID=35725</wfw:comment><description>&lt;p&gt;I’m not going to ask you to vote for the abstracts that I submitted for the &lt;a href="http://www.sqlpass.org/summit/2011/SummitContent.aspx" target="_blank"&gt;PASS Summit&lt;/a&gt;. I’m not even going to mention &lt;a href="http://sqlblog.com/blogs/rob_farley/archive/2011/05/06/lobsterpot-submissions-for-sqlpass.aspx" target="_blank"&gt;the abstracts that Roger and Ashley submitted&lt;/a&gt;. I figure if you’re reading this, you may have already read the post I wrote about them, back before SQLPASS had said that there’d be voting.&lt;/p&gt;  &lt;p&gt;Instead, I’m going to pick a few people that I recommend you &lt;a href="http://www.sqlpass.org/summit/2011/UserLogin.aspx?returnurl=%2fsummit%2f2011%2fSpeakers%2fSessionPreferencing.aspx%3fp%3d62%26preferred%3dFalse" target="_blank"&gt;vote for&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;The people I’m going to pick are Paul White, Chris Testa-O’Neill and Erin Stellato. Three very different people, even from different countries. But I don’t think any of them have spoken at the PASS Summit before, and it would be good if they got accepted.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/paul_white/" target="_blank"&gt;Paul White&lt;/a&gt; (NZ) is a fellow blogger at &lt;a href="http://sqlblog.com" target="_blank"&gt;sqlblog.com&lt;/a&gt;. If you haven’t read his stuff, you’re seriously missing out. He spends an inordinate amount of time researching the behaviour of SQL Server, and has discovered all kinds of amazing things. He recently gave a presentation at the Boston SQL Saturday, and there was a lot of good feedback about it.&lt;/p&gt;  &lt;p&gt;Chris Testa-O’Neill (UK) is one of the organisers of the SQLBits conferences in the UK, and has also appeared on many of the eLearning training for Microsoft. He hails from Manchester but has family living in Adelaide. He visited over Christmas and did an excellent job of speaking at the Adelaide SQL Server User Group.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://erinstellato.com/" target="_blank"&gt;Erin Stellato&lt;/a&gt; (US) blogs at &lt;a href="http://erinstellato.com" target="_blank"&gt;erinstellato.com&lt;/a&gt; (I guess that makes sense). I met her briefly at the last PASS Summit, but over recent months have had a few conversations with her about some of the things she writes about on her blog. She submitted an abstract for 24 Hours of PASS event, but didn’t manage to get enough votes to speak. Despite this, I know she knows her stuff, and would do an excellent job presenting. &lt;/p&gt;  &lt;p&gt;So there’s three people that I recommend you vote for. You can easily see the abstracts they’ve submitted on the site, to help in your decision. There are plenty of other people you should vote for too, such as the Scottish &lt;a href="http://www.jenstirrup.com/" target="_blank"&gt;Jen Stirrup&lt;/a&gt;, the Aussie &lt;a href="http://geekswithblogs.net/darrengosbell" target="_blank"&gt;Darren Gosbell&lt;/a&gt;, or Seattle’s own &lt;a href="http://littlekendra.com" target="_blank"&gt;Kendra Little&lt;/a&gt; (I think they haven’t spoken at the PASS Summit before either) – but please have a look through the names and pick some that are not the usual suspects.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://twitter.com/rob_farley" target="_blank"&gt;@rob_farley&lt;/a&gt;&lt;/p&gt;&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=35725" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/rob_farley/archive/tags/24hop/default.aspx">24hop</category><category domain="http://sqlblog.com/blogs/rob_farley/archive/tags/community/default.aspx">community</category><category domain="http://sqlblog.com/blogs/rob_farley/archive/tags/sql/default.aspx">sql</category><category domain="http://sqlblog.com/blogs/rob_farley/archive/tags/sqlbits/default.aspx">sqlbits</category><category domain="http://sqlblog.com/blogs/rob_farley/archive/tags/sqlpass/default.aspx">sqlpass</category></item><item><title>Using SQL Execution Plans to discover the Swedish alphabet</title><link>http://sqlblog.com/blogs/rob_farley/archive/2011/01/03/using-sql-execution-plans-to-discover-the-swedish-alphabet.aspx</link><pubDate>Mon, 03 Jan 2011 05:54:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:32237</guid><dc:creator>Rob Farley</dc:creator><slash:comments>5</slash:comments><comments>http://sqlblog.com/blogs/rob_farley/comments/32237.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/rob_farley/commentrss.aspx?PostID=32237</wfw:commentRss><wfw:comment>http://sqlblog.com/blogs/rob_farley/rsscomments.aspx?PostID=32237</wfw:comment><description>&lt;P&gt;SQL Server is quite remarkable in a bunch of ways. In this post, I’m using the way that the Query Optimizer handles LIKE to keep it SARGable, the Execution Plans that result, Collations, and PowerShell to come up with the Swedish alphabet.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://msmvps.com/blogs/robfarley/archive/2010/01/22/sargable-functions-in-sql-server.aspx" target=_blank&gt;SARGability&lt;/A&gt; is the ability to seek for items in an index according to a particular set of criteria. If you don’t have SARGability in play, you need to scan the whole index (or table if you don’t have an index). For example, I can find myself in the phonebook easily, because it’s sorted by LastName and I can find Farley in there by moving to the Fs, and so on. I can’t find everyone in my suburb easily, because the phonebook isn’t sorted that way. I can’t even find people who have six letters in their last name, because also the book is sorted by LastName, it’s not sorted by LEN(LastName). This is all stuff I’ve looked at before, including in the &lt;A href="http://www.sqlbits.com/Sessions/Event7/Understanding_SARGability_to_make_your_queries_run_faster" target=_blank&gt;talk I gave at SQLBits in October 2010&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;If I try to find everyone who’s names start with F, I can do that using a query a bit like:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;EM&gt;SELECT LastName FROM dbo.PhoneBook WHERE LEFT(LastName,1) = 'F';&lt;/EM&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Unfortunately, the Query Optimizer doesn’t realise that all the entries that satisfy LEFT(LastName,1) = 'F' will be together, and it has to scan the whole table to find them.&lt;/P&gt;
&lt;P&gt;&lt;IMG style="BACKGROUND-IMAGE:none;BORDER-BOTTOM:0px;BORDER-LEFT:0px;PADDING-LEFT:0px;PADDING-RIGHT:0px;DISPLAY:inline;BORDER-TOP:0px;BORDER-RIGHT:0px;PADDING-TOP:0px;" title=image border=0 alt=image src="http://sqlblog.com/blogs/rob_farley/image_0BB56CF3.png" width=595 height=143&gt;&lt;/P&gt;
&lt;P&gt;But if I write:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;EM&gt;SELECT LastName FROM dbo.PhoneBook WHERE LastName LIKE 'F%';&lt;/EM&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;then SQL is smart enough to understand this, and performs an Index Seek instead.&lt;/P&gt;
&lt;P&gt;&lt;IMG style="BACKGROUND-IMAGE:none;BORDER-BOTTOM:0px;BORDER-LEFT:0px;PADDING-LEFT:0px;PADDING-RIGHT:0px;DISPLAY:inline;BORDER-TOP:0px;BORDER-RIGHT:0px;PADDING-TOP:0px;" title=image border=0 alt=image src="http://sqlblog.com/blogs/rob_farley/image_0F7311C3.png" width=566 height=133&gt;&lt;/P&gt;
&lt;P&gt;To see why, I look further into the plan, in particular, the properties of the Index Seek operator. The ToolTip shows me what I’m after:&lt;/P&gt;
&lt;P&gt;&lt;IMG style="BACKGROUND-IMAGE:none;BORDER-BOTTOM:0px;BORDER-LEFT:0px;PADDING-LEFT:0px;PADDING-RIGHT:0px;DISPLAY:inline;BORDER-TOP:0px;BORDER-RIGHT:0px;PADDING-TOP:0px;" title=image border=0 alt=image src="http://sqlblog.com/blogs/rob_farley/image_14754F72.png" width=302 height=200&gt;&lt;/P&gt;
&lt;P&gt;You’ll see that it does a Seek to find any entries that are at least F, but not yet G. There’s an extra Predicate in there (a Residual Predicate if you like), which checks that each LastName is really LIKE F% – I suppose it doesn’t consider that the Seek Predicate is quite enough – but most of the benefit is seen by its working out the Seek Predicate, filtering to just the “at least F but not yet G” section of the data.&lt;/P&gt;
&lt;P&gt;This got me curious though, particularly about where the G comes from, and whether I could leverage it to create the Swedish alphabet.&lt;/P&gt;
&lt;P&gt;I know that in the Swedish language, there are three extra letters that appear at the end of the alphabet. One of them is ä that appears in the word Västerås. It turns out that Västerås is quite hard to find in an index when you’re looking it up in a Swedish map. I talked about this briefly in my five-minute &lt;A href="http://bit.ly/RFCollation" target=_blank&gt;talk on Collation&lt;/A&gt; from SQLPASS (the one which was slightly less than serious).&lt;/P&gt;
&lt;P&gt;So by looking at the plan, I can work out what the next letter is in the alphabet of the collation used by the column. In other words, if my alphabet were Swedish, I’d be able to tell what the next letter after F is – just in case it’s not G.&lt;/P&gt;
&lt;P&gt;It turns out it is… Yes, the Swedish letter after F is G. But I worked this out by using a copy of my PhoneBook table that used the Finnish_Swedish_CI_AI collation. I couldn’t find how the Query Optimizer calculates the G, and my friend &lt;A href="http://sqlblog.com/blogs/paul_white/" target=_blank&gt;Paul White&lt;/A&gt; (&lt;A href="http://twitter.com/SQL_Kiwi" target=_blank&gt;@SQL_Kiwi&lt;/A&gt;) tells me that it’s frustratingly internal to the QO. He’s particularly smart, even if he is from New Zealand.&lt;/P&gt;
&lt;P&gt;To investigate further, I decided to do some PowerShell, leveraging the &lt;A href="http://sqlblog.com/blogs/rob_farley/archive/2010/12/07/powershell-to-fetch-a-sql-execution-plan.aspx" target=_blank&gt;Get-SqlPlan function&lt;/A&gt; that I blogged about recently (make sure you also have the SqlServerCmdletSnapin100 snap-in added. To do that, run &lt;EM&gt;get-pssnapin -reg&lt;/EM&gt; to see if it's on the machine, and &lt;EM&gt;get-pssnapin -reg | add-pssnapin&lt;/EM&gt; to make the cmdlet available).&lt;/P&gt;
&lt;P&gt;I started by indicating that I was going to use Finnish_Swedish_CI_AI as my collation of choice, and that I’d start whichever letter came straight after the number 9. I figure that this is a cheat’s way of guessing the first letter of the alphabet (but it doesn’t actually work in Unicode – luckily I’m using varchar not nvarchar. Actually, there are a few aspects of this code that only work using ASCII, so apologies if you were wanting to apply it to Greek, Japanese, etc). I also initialised my $alphabet variable.&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;EM&gt;$collation = 'Finnish_Swedish_CI_AI'; &lt;BR&gt;$firstletter = '9'; &lt;BR&gt;$alphabet = '';&lt;/EM&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Now I created the table for my test. A single field would do, and putting a Clustered Index on it would suffice for the Seeks. &lt;EM&gt;[Edit: You may need to insert some rows if you find that it's producing&amp;nbsp;an Index Scan. Theoretically it should prefer to Scan,&amp;nbsp;knowing there's&amp;nbsp;no rows, but my tests showed it would always Seek]&lt;/EM&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;EM&gt;Invoke-Sqlcmd -server . -data tempdb -query "create table dbo.collation_test (col varchar(10) collate $collation primary key);"&lt;/EM&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Now I get into the looping. &lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;EM&gt;$c = $firstletter; &lt;BR&gt;$stillgoing = $true; &lt;BR&gt;while ($stillgoing) &lt;BR&gt;{&lt;/EM&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I construct the query I want, seeking for entries which start with whatever $c has reached, and get the plan for it:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;EM&gt;$query = "select col from dbo.collation_test where col like '$($c)%';"; &lt;BR&gt;[xml] $pl = get-sqlplan $query "." "tempdb";&lt;/EM&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;At this point, my $pl variable is a scary piece of XML, representing the execution plan. A bit of hunting through it showed me that the EndRange element contained what I was after, and that if it contained NULL, then I was done.&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;EM&gt;$stillgoing = ($pl.ShowPlanXML.BatchSequence.Batch.Statements.StmtSimple.QueryPlan.RelOp.IndexScan.SeekPredicates.SeekPredicateNew.SeekKeys.EndRange -ne $null);&lt;/EM&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Now I could grab the value out of it (which came with apostrophes that needed stripping), and append that to my $alphabet variable.&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;EM&gt;&amp;nbsp; if ($stillgoing) &lt;BR&gt;&amp;nbsp; {&amp;nbsp; &lt;BR&gt;$c=$pl.ShowPlanXML.BatchSequence.Batch.Statements.StmtSimple.QueryPlan.RelOp.IndexScan.SeekPredicates.SeekPredicateNew.SeekKeys.EndRange.RangeExpressions.ScalarOperator.ScalarString.Replace("'",""); &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $alphabet += $c; &lt;BR&gt;&amp;nbsp; }&lt;/EM&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Finally, finishing the loop, dropping the table, and showing my alphabet!&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;EM&gt;} &lt;BR&gt;Invoke-Sqlcmd -server . -data tempdb -query "drop table dbo.collation_test;"; &lt;BR&gt;$alphabet;&lt;/EM&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;When I run all this, I see that the Swedish alphabet is ABCDEFGHIJKLMNOPQRSTUVXYZÅÄÖ, which matches what I see at &lt;A href="http://en.wikipedia.org/wiki/Swedish_orthography" target=_blank&gt;Wikipedia&lt;/A&gt;. Interesting to see that the letters on the end are still there, even with Case Insensitivity. Turns out they’re not just “letters with accents”, they’re letters in their own right.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://sqlblog.com/blogs/rob_farley/image_528E6A23.png"&gt;&lt;IMG style="BACKGROUND-IMAGE:none;BORDER-BOTTOM:0px;BORDER-LEFT:0px;PADDING-LEFT:0px;PADDING-RIGHT:0px;DISPLAY:inline;BORDER-TOP:0px;BORDER-RIGHT:0px;PADDING-TOP:0px;" title=image border=0 alt=image src="http://sqlblog.com/blogs/rob_farley/image_thumb_0511C796.png" width=609 height=292&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;I’m sure you gave up reading long ago, and really aren’t that&amp;nbsp;grabbed about the idea of doing this using PowerShell. I chose PowerShell because I’d already come up with an easy way of grabbing the estimated plan for a query, and PowerShell does allow for easy navigation of XML.&lt;/P&gt;
&lt;P&gt;I find the most interesting aspect of this as the fact that the Query Optimizer uses the next letter of the alphabet to maintain the SARGability of LIKE. &lt;A href="https://connect.microsoft.com/SQLServer/feedback/details/526431/make-more-functions-sargable" target=_blank&gt;I’m hoping they do something similar for a whole bunch of operations&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;Oh, and the fact that you know how to find stuff in the IKEA catalogue.&lt;/P&gt;
&lt;HR&gt;

&lt;P&gt;Footnote: &lt;/P&gt;
&lt;P&gt;If you are interested in whether this works in other languages, you might want to consider the following screenshot, which shows that in principle, it should work with Japanese. It might be a bit harder to run this in PowerShell though, as I’m not sure how it translates. In Hiragana, the Japanese alphabet starts あ, ぃ, ぅ, ぇ, ぉ, ...&lt;/P&gt;
&lt;P&gt;&lt;A href="http://sqlblog.com/blogs/rob_farley/image_20F2D6C1.png"&gt;&lt;IMG style="BACKGROUND-IMAGE:none;BORDER-BOTTOM:0px;BORDER-LEFT:0px;PADDING-LEFT:0px;PADDING-RIGHT:0px;DISPLAY:inline;BORDER-TOP:0px;BORDER-RIGHT:0px;PADDING-TOP:0px;" title=image border=0 alt=image src="http://sqlblog.com/blogs/rob_farley/image_thumb_57DC8F2D.png" width=644 height=413&gt;&lt;/A&gt;&lt;/P&gt;&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=32237" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/rob_farley/archive/tags/collation/default.aspx">collation</category><category domain="http://sqlblog.com/blogs/rob_farley/archive/tags/indexing/default.aspx">indexing</category><category domain="http://sqlblog.com/blogs/rob_farley/archive/tags/powershell/default.aspx">powershell</category><category domain="http://sqlblog.com/blogs/rob_farley/archive/tags/sql/default.aspx">sql</category><category domain="http://sqlblog.com/blogs/rob_farley/archive/tags/sqlbits/default.aspx">sqlbits</category><category domain="http://sqlblog.com/blogs/rob_farley/archive/tags/sqlpass/default.aspx">sqlpass</category></item><item><title>Visualising data a different way with Pivot collections</title><link>http://sqlblog.com/blogs/rob_farley/archive/2010/12/29/visualising-data-a-different-way-with-pivot-collections.aspx</link><pubDate>Wed, 29 Dec 2010 02:50:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:32068</guid><dc:creator>Rob Farley</dc:creator><slash:comments>1</slash:comments><comments>http://sqlblog.com/blogs/rob_farley/comments/32068.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/rob_farley/commentrss.aspx?PostID=32068</wfw:commentRss><wfw:comment>http://sqlblog.com/blogs/rob_farley/rsscomments.aspx?PostID=32068</wfw:comment><description>&lt;P&gt;&lt;A href="http://www.rogernoble.com/2010/12/21/enhanced-pivotviewer/" target=_blank&gt;Roger&lt;/A&gt;’s been doing a great job extending PivotViewer recently, and you can find the list of LobsterPot pivots at &lt;A href="http://pivot.lobsterpot.com.au/" target=_blank&gt;http://pivot.lobsterpot.com.au&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Many months back, the &lt;A href="http://www.ted.com/talks/gary_flake_is_pivot_a_turning_point_for_web_exploration.html" target=_blank&gt;TED Talk that Gary Flake did about Pivot&lt;/A&gt; caught my imagination, and I did some research into it. At the time, most of what we did with Pivot was geared towards what we could do for clients, including making Pivot collections based on students at a school, and using it to browse PDF invoices by their various properties. We had actual commercial work based on Pivot collections back then, and it was all kinds of fun. Later, we made some collections for events that were happening, and even got featured in the TechEd Australia keynote.&lt;/P&gt;
&lt;P&gt;But I’m getting ahead of myself... let me explain the concept.&lt;/P&gt;
&lt;P&gt;A Pivot collection is an XML file (with .cxml extension) which lists Items, each linking to an image that’s stored in a Deep Zoom format (this means that it contains tiles like Bing Maps, so that the browser can request only the ones of interest according to the zoom level). This collection can be shown in a Silverlight application that uses the PivotViewer control, or in the Pivot Browser that’s available from &lt;A href="http://getpivot.com/" target=_blank&gt;getpivot.com&lt;/A&gt;. Filtering and sorting the items according to their facets (attributes, such as size, age, category, etc), the PivotViewer rearranges the way that these are shown in a very dynamic way. To quote Gary Flake, this lets us “see patterns which are otherwise hidden”.&lt;/P&gt;
&lt;P&gt;&lt;IMG style="BORDER-BOTTOM:0px;BORDER-LEFT:0px;PADDING-LEFT:0px;PADDING-RIGHT:0px;DISPLAY:inline;BORDER-TOP:0px;BORDER-RIGHT:0px;PADDING-TOP:0px;" title=image border=0 alt=image src="http://sqlblog.com/blogs/rob_farley/image_10AC23CA.png" width=357 height=231&gt;&lt;BR&gt;&lt;IMG style="BACKGROUND-IMAGE:none;BORDER-BOTTOM:0px;BORDER-LEFT:0px;PADDING-LEFT:0px;PADDING-RIGHT:0px;DISPLAY:inline;BORDER-TOP:0px;BORDER-RIGHT:0px;PADDING-TOP:0px;" title=image border=0 alt=image src="http://sqlblog.com/blogs/rob_farley/image_283FDDD0.png" width=357 height=229&gt;&lt;BR&gt;&lt;IMG style="BACKGROUND-IMAGE:none;BORDER-BOTTOM:0px;BORDER-LEFT:0px;PADDING-LEFT:0px;PADDING-RIGHT:0px;DISPLAY:inline;BORDER-TOP:0px;BORDER-RIGHT:0px;PADDING-TOP:0px;" title=image border=0 alt=image src="http://sqlblog.com/blogs/rob_farley/image_03DAADB4.png" width=355 height=228&gt;&lt;/P&gt;
&lt;P&gt;This browsing mechanism is very suited to a number of different methods, because it’s just that – browsing. It’s not searching, it’s more akin to window-shopping than doing an internet search.&lt;/P&gt;
&lt;P&gt;When we decided to put something together for the conferences such as TechEd Australia 2010 and the PASS Summit 2010, we did some screen-scraping to provide a different view of data that was already available online. &lt;A href="http://www.nickhodge.com/blog/" target=_blank&gt;Nick Hodge&lt;/A&gt; and &lt;A href="http://delicategeniusblog.com/" target=_blank&gt;Michael Kordahi&lt;/A&gt; from Microsoft liked the idea a lot, and after a bit of tweaking, we produced one that Michael used in the TechEd Australia keynote to show the variety of talks on offer. &lt;/P&gt;
&lt;P&gt;&lt;IMG style="BACKGROUND-IMAGE:none;BORDER-BOTTOM:0px;BORDER-LEFT:0px;PADDING-LEFT:0px;PADDING-RIGHT:0px;DISPLAY:inline;BORDER-TOP:0px;BORDER-RIGHT:0px;PADDING-TOP:0px;" title=Keynote_Pivot border=0 alt=Keynote_Pivot src="http://sqlblog.com/blogs/rob_farley/Keynote_Pivot_4CA0F9ED.jpg" width=429 height=287&gt;&lt;/P&gt;
&lt;P&gt;It’s interesting to see&amp;nbsp;a pattern in this data: The Office track has the most sessions, but if the Interactive Sessions and Instructor-Led Labs are removed, it drops down to only the sixth most popular track, with Cloud Computing taking over.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://sqlblog.com/blogs/rob_farley/image_7798E7F2.png"&gt;&lt;IMG style="BORDER-BOTTOM:0px;BORDER-LEFT:0px;PADDING-LEFT:0px;PADDING-RIGHT:0px;DISPLAY:inline;BORDER-TOP:0px;BORDER-RIGHT:0px;PADDING-TOP:0px;" title=image border=0 alt=image src="http://sqlblog.com/blogs/rob_farley/image_thumb_652C833E.png" width=358 height=197&gt;&lt;/A&gt;&lt;A href="http://sqlblog.com/blogs/rob_farley/image_793579FA.png"&gt;&lt;IMG style="BORDER-BOTTOM:0px;BORDER-LEFT:0px;PADDING-LEFT:0px;PADDING-RIGHT:0px;DISPLAY:inline;BORDER-TOP:0px;BORDER-RIGHT:0px;PADDING-TOP:0px;" title=image border=0 alt=image src="http://sqlblog.com/blogs/rob_farley/image_thumb_3FBE7BD1.png" width=356 height=196&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;This is something which just isn’t obvious when you look an ordinary search tool. You get a much better &lt;EM&gt;feel&lt;/EM&gt; for the data when moving around it like this.&lt;/P&gt;
&lt;P&gt;The more observant amongst you will have noticed some difference in the collection that Michael is demonstrating in the picture above with the screenshots I’ve shown. That’s because it’s been extended some more.&lt;/P&gt;
&lt;P&gt;At the SQLBits conference in the UK this year, I had some interesting discussions with the guys from &lt;A href="http://xpert360.com/" target=_blank&gt;Xpert360&lt;/A&gt;, particularly Phil Carter, who I’d met in 2009 at an earlier SQLBits conference. They had got around to producing a Pivot collection based on the SQLBits data, which we had been planning to do but ran out of time. We discussed some of ways that Pivot could be used, including the ways that my old friend &lt;A href="http://codebetter.com/howarddierking/" target=_blank&gt;Howard Dierking&lt;/A&gt; had extended it for the &lt;A href="http://msdn.microsoft.com/en-us/magazine/default.aspx" target=_blank&gt;MSDN Magazine&lt;/A&gt;. I’m not suggesting I influenced Xpert360 at all, but they certainly inspired us with some of their &lt;A href="http://xpert360.wordpress.com/category/pivotviewer/" target=_blank&gt;posts on the matter&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;So with LobsterPot guys &lt;A href="http://david.gardiner.net.au/" target=_blank&gt;David Gardiner&lt;/A&gt; and &lt;A href="http://www.rogernoble.com/" target=_blank&gt;Roger Noble&lt;/A&gt; both having dabbled in Pivot collections (and Dave doing some for clients), I set Roger to work on extending it some more. He’s used various events and so on to be able to make an environment that allows us to do quick deployment of new collections, as well as showing the data in a grid view which behaves as if it were simply a third view of the data (the other two being the array of images and the ‘histogram’ view). &lt;/P&gt;
&lt;P&gt;I see PivotViewer as being a significant step in data visualisation – so much so that I feature it when I deliver talks on Spatial Data Visualisation methods. Any time when there is information that can be conveyed through an image, you have to ask yourself how best to show that image, and whether that image is the focal point. For Spatial data, the image is most often a map, and the map becomes the central mode for navigation. I show Pivot with postcode areas, since I can browse the postcodes based on their data, and many of the images are recognisable (to locals of South Australia).&lt;/P&gt;
&lt;P&gt;&lt;IMG style="BACKGROUND-IMAGE:none;BORDER-BOTTOM:0px;BORDER-LEFT:0px;PADDING-LEFT:0px;PADDING-RIGHT:0px;DISPLAY:inline;BORDER-TOP:0px;BORDER-RIGHT:0px;PADDING-TOP:0px;" title=image border=0 alt=image src="http://sqlblog.com/blogs/rob_farley/image_39677F76.png" width=378 height=209&gt;&lt;/P&gt;
&lt;P&gt;Naturally, the images could link through to the map itself, and so on, but generally people think of Spatial data in terms of navigating a map, which doesn’t always gel with the information you’re trying to extract. Roger’s even looking into ways to hook PivotViewer into the Bing Maps API, in a similar way to the &lt;A href="http://deepearth.codeplex.com/" target=_blank&gt;Deep Earth&lt;/A&gt; project, displaying different levels of map detail according to how ‘zoomed in’ the images are.&lt;/P&gt;
&lt;P&gt;Some of the work that Dave did with one of the schools was generating the Deep Zoom tiles “on the fly”, based on images stored in a database, and Roger has produced a collection which uses &lt;A href="http://pivot.lobsterpot.com.au/flickr" target=_blank&gt;images from flickr&lt;/A&gt;, that lets you move from one search term to another. Pulling the images down from flickr.com isn’t particularly ideal from a performance aspect, and flickr doesn’t store images in a small-enough format to really lend itself to this use, but you might agree that it’s an interesting concept which compares nicely to using Maps.&lt;/P&gt;
&lt;P&gt;I’m looking forward to future versions of the PivotViewer control, and hope they provide many more events that can be used, and even more hooks into it.&lt;/P&gt;
&lt;P&gt;Naturally, LobsterPot could help provide your business with a PivotViewer experience, but you can probably do a lot of it yourself too. There’s a thorough guide at &lt;A href="http://getpivot.com/"&gt;getpivot.com&lt;/A&gt;, which is how we got into it. For some examples of what we’ve done, have a look at &lt;A href="http://pivot.lobsterpot.com.au/"&gt;http://pivot.lobsterpot.com.au&lt;/A&gt;. I’d like to see PivotViewer really catch on a data visualisation tool.&lt;/P&gt;&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=32068" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/rob_farley/archive/tags/lobsterpot/default.aspx">lobsterpot</category><category domain="http://sqlblog.com/blogs/rob_farley/archive/tags/pivotviewer/default.aspx">pivotviewer</category><category domain="http://sqlblog.com/blogs/rob_farley/archive/tags/sql/default.aspx">sql</category><category domain="http://sqlblog.com/blogs/rob_farley/archive/tags/sqlbits/default.aspx">sqlbits</category><category domain="http://sqlblog.com/blogs/rob_farley/archive/tags/sqlpass/default.aspx">sqlpass</category></item><item><title>SARGability isn’t about the left-hand side</title><link>http://sqlblog.com/blogs/rob_farley/archive/2010/10/13/sargability-isn-t-about-the-left-hand-side.aspx</link><pubDate>Tue, 12 Oct 2010 22:10:12 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:29350</guid><dc:creator>Rob Farley</dc:creator><slash:comments>0</slash:comments><comments>http://sqlblog.com/blogs/rob_farley/comments/29350.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/rob_farley/commentrss.aspx?PostID=29350</wfw:commentRss><wfw:comment>http://sqlblog.com/blogs/rob_farley/rsscomments.aspx?PostID=29350</wfw:comment><description>This month’s T-SQL Tuesday has me caught slightly unawares. I’m in the UK, having come over for SQLBits , and I’m left writing this with only a few hours to go. The theme this time is on misconceptions in SQL, and this fits nicely with SARGability – one...(&lt;a href="http://sqlblog.com/blogs/rob_farley/archive/2010/10/13/sargability-isn-t-about-the-left-hand-side.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=29350" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/rob_farley/archive/tags/indexing/default.aspx">indexing</category><category domain="http://sqlblog.com/blogs/rob_farley/archive/tags/sql/default.aspx">sql</category><category domain="http://sqlblog.com/blogs/rob_farley/archive/tags/sqlbits/default.aspx">sqlbits</category><category domain="http://sqlblog.com/blogs/rob_farley/archive/tags/t-sql+tuesday/default.aspx">t-sql tuesday</category></item><item><title>Time away from a growing company</title><link>http://sqlblog.com/blogs/rob_farley/archive/2010/09/21/time-away-from-a-growing-company.aspx</link><pubDate>Tue, 21 Sep 2010 03:14:21 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:28874</guid><dc:creator>Rob Farley</dc:creator><slash:comments>1</slash:comments><comments>http://sqlblog.com/blogs/rob_farley/comments/28874.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/rob_farley/commentrss.aspx?PostID=28874</wfw:commentRss><wfw:comment>http://sqlblog.com/blogs/rob_farley/rsscomments.aspx?PostID=28874</wfw:comment><description>At LobsterPot , I’m very blessed to have excellent staff working for me. Someone asked me just today why we haven’t grown more than we have in the past year, but in just over a year I’ve brought on 3 staff members and have another one starting next month....(&lt;a href="http://sqlblog.com/blogs/rob_farley/archive/2010/09/21/time-away-from-a-growing-company.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=28874" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/rob_farley/archive/tags/lobsterpot/default.aspx">lobsterpot</category><category domain="http://sqlblog.com/blogs/rob_farley/archive/tags/partner+network/default.aspx">partner network</category><category domain="http://sqlblog.com/blogs/rob_farley/archive/tags/sqlbits/default.aspx">sqlbits</category></item><item><title>24 Hours of PASS – sargability resources</title><link>http://sqlblog.com/blogs/rob_farley/archive/2010/09/17/24-hours-of-pass-sargability-resources.aspx</link><pubDate>Fri, 17 Sep 2010 00:33:42 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:28822</guid><dc:creator>Rob Farley</dc:creator><slash:comments>0</slash:comments><comments>http://sqlblog.com/blogs/rob_farley/comments/28822.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/rob_farley/commentrss.aspx?PostID=28822</wfw:commentRss><wfw:comment>http://sqlblog.com/blogs/rob_farley/rsscomments.aspx?PostID=28822</wfw:comment><description>I just did a talk for 24 Hours of PASS on Sargability . I’ve done this talk before (about five months ago at the user group I run and at the PASS AppDev Virtual Chapter ). There are a number of useful resources out there about sargability. I’ve blogged...(&lt;a href="http://sqlblog.com/blogs/rob_farley/archive/2010/09/17/24-hours-of-pass-sargability-resources.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=28822" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/rob_farley/archive/tags/sql/default.aspx">sql</category><category domain="http://sqlblog.com/blogs/rob_farley/archive/tags/sqlbits/default.aspx">sqlbits</category><category domain="http://sqlblog.com/blogs/rob_farley/archive/tags/sqlpass/default.aspx">sqlpass</category></item><item><title>Something for everyone at the SQLBits Training Day</title><link>http://sqlblog.com/blogs/rob_farley/archive/2010/09/03/something-for-everyone-at-the-sqlbits-training-day.aspx</link><pubDate>Fri, 03 Sep 2010 05:03:30 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:28554</guid><dc:creator>Rob Farley</dc:creator><slash:comments>1</slash:comments><comments>http://sqlblog.com/blogs/rob_farley/comments/28554.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/rob_farley/commentrss.aspx?PostID=28554</wfw:commentRss><wfw:comment>http://sqlblog.com/blogs/rob_farley/rsscomments.aspx?PostID=28554</wfw:comment><description>Of course, the one not to miss is the one I’m doing, on Fixing Queries with Advanced T-SQL Techniques , but actually, they’re all excellent. For example, Simon’s just blogged that Buck Woody’s seminar topic has changed . Instead of being on career development,...(&lt;a href="http://sqlblog.com/blogs/rob_farley/archive/2010/09/03/something-for-everyone-at-the-sqlbits-training-day.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=28554" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/rob_farley/archive/tags/community/default.aspx">community</category><category domain="http://sqlblog.com/blogs/rob_farley/archive/tags/sql/default.aspx">sql</category><category domain="http://sqlblog.com/blogs/rob_farley/archive/tags/sqlbits/default.aspx">sqlbits</category></item><item><title>Q&amp;A about my SQLBits precon</title><link>http://sqlblog.com/blogs/rob_farley/archive/2010/09/01/q-a-about-my-sqlbits-precon.aspx</link><pubDate>Tue, 31 Aug 2010 12:42:05 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:28459</guid><dc:creator>Rob Farley</dc:creator><slash:comments>0</slash:comments><comments>http://sqlblog.com/blogs/rob_farley/comments/28459.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/rob_farley/commentrss.aspx?PostID=28459</wfw:commentRss><wfw:comment>http://sqlblog.com/blogs/rob_farley/rsscomments.aspx?PostID=28459</wfw:comment><description>I received an email from someone who’s trying to decide whether or not to register for my precon at SQLBits 7 next month. He’s already coming to the event (which should be a given for anyone who can make it), but he was trying to work out a few things...(&lt;a href="http://sqlblog.com/blogs/rob_farley/archive/2010/09/01/q-a-about-my-sqlbits-precon.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=28459" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/rob_farley/archive/tags/sql/default.aspx">sql</category><category domain="http://sqlblog.com/blogs/rob_farley/archive/tags/sqlbits/default.aspx">sqlbits</category></item><item><title>SQLBits pre-con – Fixing Queries with Advanced T-SQL</title><link>http://sqlblog.com/blogs/rob_farley/archive/2010/07/28/sqlbits-pre-con-fixing-queries-with-advanced-t-sql.aspx</link><pubDate>Wed, 28 Jul 2010 11:50:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:27365</guid><dc:creator>Rob Farley</dc:creator><slash:comments>0</slash:comments><comments>http://sqlblog.com/blogs/rob_farley/comments/27365.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/rob_farley/commentrss.aspx?PostID=27365</wfw:commentRss><wfw:comment>http://sqlblog.com/blogs/rob_farley/rsscomments.aspx?PostID=27365</wfw:comment><description>I’m giving a pre-con seminar at SQLBits 7 on September 30 this year in York (the Old one, in Yorkshire – similar to the New one, but with different songs ). Let me quickly explain a few things about it – to help you persuade your boss to let you attend...(&lt;a href="http://sqlblog.com/blogs/rob_farley/archive/2010/07/28/sqlbits-pre-con-fixing-queries-with-advanced-t-sql.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=27365" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/rob_farley/archive/tags/community/default.aspx">community</category><category domain="http://sqlblog.com/blogs/rob_farley/archive/tags/sql/default.aspx">sql</category><category domain="http://sqlblog.com/blogs/rob_farley/archive/tags/sqlbits/default.aspx">sqlbits</category></item></channel></rss>