Site icon Brent Ozar

The One Pound SQL Server: Dell Venue Pro 8

I should have bought one with an ARM processor.
I should have bought one with an ARM processor.

If you’re like me (and I have a feeling you’re not), you’ve always wanted a portable backup SQL Server that you could use for presentations, script authoring, and settling bar bets – but you didn’t want to pay a lot for this muffler.

Enter the $250 Dell Venue 8 Pro running full-blown Windows 8.1 (none of that crippled “RT” stuff), an Intel Atom processor, 2GB RAM, and 32GB of internal storage. I won it free at SQLSaturday Madison 2014, but I’ve sunk about another $100 into it:

This Isn’t a Windows 8.1 Review.

I’ve been an OS X user for about the last ten years, and I have passionate feelings about how operating systems and tablets should work. The Venue Pro 8 was never destined to be the device that wooed me away from the Apple ecosystem.

However, I know a lot of you are Windows users, and I don’t think you’re going to be big fans of the combination of an 8″ screen, 1280×800 resolution, and Windows 8.1’s wacky touch targets. Let’s not mince words: it’s totally awkward to interact with this device unless you’re using a stylus or a mouse.

But who cares? I’ve got a handheld SQL Server that fits in my winter jacket pocket. So let’s do this.

Installing SQL Server 2014 and the StackOverflow Databases

The Venue is powered by an Intel Atom processor, which means we need the 32-bit version of SQL Server 2014. (Suddenly, I’m glad Microsoft still ships and supports the x86 architecture rather than only allowing 64-bit ones!)

I wanted the system databases (including TempDB) to be hosted on the MicroSD card because my Venue has very limited system drive space. However, by default Windows doesn’t like installing permanent stuff on removable media. I used this hack to turn the MicroSD card into permanent space – it mounts the SD card as an NTFS folder off the C drive. That way, you can install apps to it. (If I was going to keep this tablet long-term, I’d have wiped and reinstalled Windows with no recovery partition and less features to save several gigs of space – but more on that later.)

After installing SQL Server, Office 2013, and a few of my core Dropbox folders, I was left with 55GB free space on my SD card – and one big choice to make.

In my post How to Query the Stack Exchange databases, I describe how to import their public database exports into Microsoft SQL Server. I love using these for query tuning demos, but…the database is about 40GB with no indexes. SQL’s data compression doesn’t help much either because the bulk of the data is off-row text fields for questions, answers, and comments.

Rather than restore the entire 40GB database over to the Venue, I logged into my dev VM (with the full Stack Overflow export database already created), then scripted out the database – including the statistics and histograms. In SQL Server Management Studio, right-click on the database name, click Tasks, Generate Scripts. The important part is clicking the Advanced button on the Set Scripting Options step:

Scripting the statistics and histograms

By default, the Script Statistics option is set to “Do not script statistics”, but you want to change that to “Script statistics and histograms.”

The end result is a 3MB file that contains not just the object definitions, but also the STATS_STREAM parameter:

Scripted statistics – note the STATS_STREAM parameter

I copied that file over to the Venue, but before I ran it, I changed the file paths and the initial starting size of the database to be 4MB (instead of 40GB) and changed the log size to be 1MB. Then I ran it – although oddly, I got a few errors about some of the stats being corrupt – I haven’t dug into that to see why:

Building the scripted skeleton database

Then, presto, I had a skeleton StackOverflow database where I could get estimated execution plans for queries:

Estimated execution plan with query costs

Even though I’ve got an empty 4MB database, my execution plan estimates show millions of rows will be returned.

Keep security concerns in mind though, because even though the database is empty, the statistics still have real metadata that may pose a security concern. For example, I created an index on Users.DisplayName, and then the database statistics include a subset of usernames:

Statistics with Data

If you script out your production database, you’re sure to have statistics on fields that your employer would rather not see on your tablet – like customer names, sales amounts, and product prices.

Despite the security concerns, this technique is really useful for taking a mature production database and putting it onto a desktop (or tablet) for query tuning.

But note the word “mature” – this technique only works well on databases with plenty of statistics, which the Stack Overflow database export definitely does not have. It’s just the data, no indexes or stats. If you try to filter on columns without statistics, you’re going to get completely unrealistic plans. For my demos, I needed a real full-blown copy of the Stack database on the Venue.

Writing Queries on an 8″ Touchscreen

SSMS 2014 on the Dell Venue 8 Pro

SSMS works best on the Venue Pro 8 when you’re in portrait mode. That seemed counterintuitive to me – an 8″ wide SSMS screen is incredibly small – but in landscape mode, you only get a couple of lines for the query and a couple of rows worth of results. In portrait mode, you get a nice square UI with room for both.

At first, the touch targets seem way too small in Object Explorer when you’re looking at a list of database objects and trying to click on the right one, but there’s two easy options: a stylus, or Windows 8.1 Magnifier. I just leave the Magnifier on in Lens mode, which gives me a small rectangle of zoomed-in area that I can move around the screen when I need to click on things.

When it’s time to write a query, the seams start to show between the combination of a niche Microsoft app, a designed-for-mainstream Microsoft OS, and designed-for-the-pocket tablet hardware:

Red Gate SQL Prompt would make this easier, but at $369, it costs more than the entire computer, and it would still rely on the tab key. The easiest way to get a tab with one hand is to hold down the “&123” key, then hit tab, then hit “&123” again. That three-motion combo gets old fast.

All things considered, writing queries on this thing isn’t pleasant, but it works well enough that I leave the Venue 8 Pro in my airplane carryon bag to play around with DMV queries on small planes. I wouldn’t want to use it to finish a customer project on a deadline – I’d whip out a real laptop for that – but for learning or blogging purposes, it’s a neat way to pass the time in a cramped plane seat. For example, I’m mesmerized at the thought of duplicating Postgres’s Hibernator with T-SQL DMV queries, and I can work on that while disconnected.

In all, I’m just hooked enough. My ultra-light laptop bag now holds three separate devices: my 15″ MacBook Pro, my iPad Air, and this Venue 8 Pro. I’m amazed that I can fit so much functionality in that light bag. The Venue 8 Pro is the last resort, saved for really cramped seats like regional jets, but it’s gradually taking over more duties from my iPad.

I love love love the 8″ tablet form factor for watching TV shows, reading e-books, playing games, and surfing the web. It’s nowhere near the right size for legacy Windows desktop apps like SSMS, though – the tiny touch points just don’t work. That’s probably why the upcoming mini-Surface is rumored to only run Windows RT, which means no SQL Server. I understand the logic – why let it run desktop apps if the experience is miserable? I just think the biggest thing missing is good pinch-and-zoom support in display drivers, and instantly legacy apps like SSMS would be much more tolerable.

The Search for the Perfect Tablet Continues

Eventually, a device will come out that replaces both the iPad and the Venue 8. I travel a lot to do presentations at clients, user groups, and conferences, and as I wrote in my Surface RT and Surface Pro posts, I still want a tablet that can:

The One Pound SQL Server

I love my iPad, but it’s not even close to suitable. The Dell Venue 8 Pro matches the first three, but struggles with the last two. There’s only a micro USB port, and it can’t simultaneously handle the combination of video output, USB clicker, and power.

Because the Venue is so dang close, I went off looking for another 8″ tablet that would get closer, but it looks like the perfect option still isn’t out yet. The Lenovo ThinkPad 8’s hardware support for USB and display output makes it look better, but The Verge reports that the combination of a 1900×1200 8″ display, no stylus support, and tiny legacy app touch targets means:

“…without a small tip Desktop mode is all but unusable. My finger is bigger than most icons or buttons, and when I found myself in the system settings or the Control Panel, I’d wind up squinting at the screen and wondering if someday we’ll evolve to have thinner fingers so we can tap in these tiny boxes.”

Ouch – no go.

With every iteration, Windows keeps getting closer, and I’m excited for the day when it’s a reality.

In the meantime, though, if you’re a Windows IT pro, you’re already accustomed to Windows 8, and you’ve got legacy apps you want to use on the go, the $250 Dell Venue 8 Pro is a fun gadget.

Exit mobile version