News

22nd March 2014

I\’ve been selected to present a session on Policy-Based Management at SQL Saturday 269 in Exeter, UK. I\’m honoured and a little scared by this, but it\’ll be a grand day out nonetheless, I\’m sure. #excitedmuch ?

5th March 2014

Heading down to Southampton for a user-group meeting. #geeknight



SQL Relay 2013R2

That was more fun than is normal to be had on a weekday. Reading and Bristol were the venues of choice – both excellent for content and geekmeets 🙂

15th Dec 2013

Registered for #SQLSaturday269 in Exeter – March 22nd 2014 ! Have you ? 

17th Oct 2013

I\’m off to SQL Southwest to talk about Policy-Based Management and eat pizza ! Really looking forward to it 🙂

update: Thanks for having me, peeps, and hope you enjoyed the talk. See you soon, I hope…

12th Sept 2012

Tonight I\’ll be speaking at the Bath Royal Literary and Scientific Institute, sharing some thoughts on cloud-based SQL Server, and showcasing a couple of productivity tools I think that every DBA should have:

SQLSearch from RedGate Software

Plan Explorer from SQL Sentry

SQLAssistant from SoftTreeTechnologies

Should be a fun night. Might event make it to the excellent Salamander on John Street !

The Database Tuning Advisor – Schroedinger\'s Sledgehammer

The Database Tuning Advisor – Schroedinger\’s Sledgehammer

Database performance tuning is bit of a dark art to most people. Hell, even the best of use gets it wrong sometimes, but that’s usually mitigated by experience. Experience of several late nights and busy days trying to bring the production database back to life, but that’s a whole other story.

We were talking the other day about index fragmentation, and the impact of clustered index inserts on non-clustered indexes and database snapshots. (I know, it doesn’t get much more rock’n’roll than that, right ?)

Trawling through a vendor’s database, we happened to take a look at the indexes on certain tables and we could see that most of them are prefixed ‘_dta_’. Oh, the humanity ! The dread hand of the Database Tuning Advisor (DTA) was witnessed, and it sent a shudder though all those present. Either that, or the air-con went dappy again.

The DTA is a VERY useful tool when developing and tuning your databases. You get a database load, run it through the DTA, and it’ll recommend some indexes and perhaps some statistics that may help when you go live. Hoopy, right ? I mean, you’d be pretty excited if there was a tool that can solve all your performance problems (real or imagined) BEFORE you unleash it on your estate, right ?

The answer, as always, is… (altogether now) ‘It Depends’. Not all recommendations are to be taken as gospel, and the DTA output should be taken as a starting point for your eventual implementation. The DTA doesn’t know how your data will change, how many users will be hitting it, and, most of all, it doesn’t know about those last minute ‘enhancements’ requested by the business at the last minute.


In this way, the DTA could possibly be described as Schroedinger’s Sledgehammer.


We’re all familiar with the famous cat that was used in the theoretical experiment. Wait, you’re not ? Well, lookee here : http://en.wikipedia.org/wiki/Schr%C3%B6dinger\’s_cat

TL:DR – You can’t tell what’s happened to the cat without opening the box. Sure, you can guess, but you can’t actually know. Theorise all you like, the cat’s state remains undefined until you observe the system (comprised of the box, the radioactive material, the vial, the hammer, and that poor kitty), and you can’t observe the system until you alter it (ironically, by taking a look to see what’s happened).

It is my contention that the DTA could be seen as a quantum thought experiment, in that you have some knowns (the data / the workload / the design), some suppositions (IO performance / CPU speed / constant workload), but you never really know what will happen until you observe those details in the live system.

(The Copenhagen Interpretation (q.v.) would seem to suggest that your database will be both performant and non-performant at the same time, but we know that not to be the case.)

What we DO know is that there is a performance impact on updating multiple non-clustered indexes for every clustered index, and that there are ways of identifying indexes that haven’t been used at all and are just sitting there taking up your storage and IO (sys.dm_db_index_usage_stats  and a plethora of others)


So, there is a risk, as often happens, that the DTA will recommend indexes and stats that turn out to be sub-optimal when implemented in production. Kind of like using a sledgehammer to crack a nut.


By all means, use the DTA to guide you in the right direction. But use it more like a divining rod that points the way than a big stick with which to beat your database into performance.


And if you ever see indexes in a production database that start with ‘_dta_’ spare a thought for the poor developer – they were probably only trying their best, after all !

Back soon…

Fun things to do in 2014

Fun things to do in 2014

It\’s that time of year, now that spring is in the air….

Scratch that – must have been a hangover from an earlier time. But, it *is* a New Year, and I thought I\’d jot down some thinks I\’ll be thinking about over the next 12 months. Because I can.

1.      SQL 2014 (Hekaton)

      There\’s been a whole lot of buzz over 2013 about the next release of SQL Server, now commonly called SQL 2014, but sometimes referred to as Hekaton.

      The word Hekaton is derived from the greek word for ten-fold. Actually, I think it\’s a hundred-fold, but that doesn\’t seem to matter that much to those happy guys and gals at Microsoft. The inference from the name is that you get a *massive* performance boost using Hekaton as your core engine.

      Not surprisingly, this is utter cobblers, and there\’s been quite a bit of back pedalling from MS on the subject. What you get in Hekaton is \’memory-optimised\’ tables, column-store indexes, Vertipaq, and X-Velocity structures right in the database. You also get natively compiled stored procedures, but more on that later, I think.

      But it\’s certainly something we all need to be aware of – Hekaton is coming, whether we like it or not. I\’ll write a session up for sometime later in January. No, I WILL. I promise….

       

2.      Big Data

      Another buzzword of 2013 was \’Big Data\’. Yeah, right. Big Data isn\’t about having huge amounts of data that you need to do something with. It\’s more about finding out what data you currently capture but have no use for, and finding out what that data may be able to tell you.

      For example, you know that new account openings are at an all time high, and that the average balance in Cash ISA is £1500. What we also capture behind these numbers are demographic and geographic data that can be plotted in any number of software packages and analysed to death, such as if you live in Surrey, your Cash ISA is likely to have a balance greater than one held in Sunderland.

      Big Data can also be used to let you know there are things you don\’t know, and lets you ask business questions. Like *why* is there a low take-up of FlexPlus in Hampstead, yet the highest average Credit Card available spend is on the Wirral.

      Again, there\’s a whole lot more to this, but I ask you to bear the following in mind:

          “What can our data actually tell us, and how can we design our systems to support Big Data type analysis. “

      It\’s all in the design – get that right, and your Big Data headache is less of a problem

       

3.      Small Data

       You know when you get a spreadsheet from someone that details some 2,500 servers with something wrong, but there\’s little or no supporting information to let you act quickly ? Don\’t you just hate that, to have to filter / sort / arrange the data before you can start working on what you need to do ?

       Well, when you provide data to anyone, be that a project / support contact or a huge distribution list, have a think about what you\’re actually giving them, and try to imagine the way in which they\’ll use the data. Sometimes, formatting an Excel sheet as a table is the simplest yet most time saving thing you can do for others.

       

4.      Information Flow

      I know I\’ve not posted much on the blog recently. There\’s hods of useful stuff in our heads (presumably), so let\’s get it out there. I had an interesting discussion with a colleague the other day about deleting records through a view having a different, seemingly more efficient, execution plan.

      Just writing stuff down helps you remember it as well !

       

5.      Be nice to people. Sometimes.

       OK, so I\’m not getting fluffy over this. It\’s hard to remain smiley all the time (for some people), and sometimes someone needs a slap. But I\’m trying to make the former my default response, not the latter.

       

So, Happy New Year, and watch this space for stuff. There\’s a lot of stuff about, and it\’s getting stuffier all the time. And if that\’s not your thing, try holding a chicken in the air and sticking a deckchair up your nose.

 

Back soon…