SQL Dumbass

Fighting dumbasses, one query at a time…

DBAs Are From Mars, Developers Are From Uranus

Dear SQLDumbass: We have a vendor that insists we allow their shrink database job to run nightly. They are claiming that it is “standard” to have this type of job run frequently as part of any “sound maintenance plan”. How can I politely tell them that they are wrong? – Wang Chung

Dear Mark: Politeness won’t work, they are clearly too stupid to understand any better. Oh sure, you could point them to the plethora of blog posts from Paul Randal on the subject but they are more than likely going to say “Who the hell is Paul Randal and why should I care what he says?” And it is at that point you should politely excuse yourself from the meeting and go into the parking lot to rub dog poo on their car door handles because that is what Paul would do.

Dear SQLDumbass: There is a developer here that insists we upgrade to SQL 2008 R2 immediately so that they can use PowerPivot because they saw a great demo on PowerPivot over the weekend. I thought that PowerPivot was just an add-in to Excel, and you didn’t need R2? – Kraken

Dear Jules: You are correct, PowerPivot is an add-in for Excel 2010. You do not need to upgrade to SQL 2008 R2, you only need to get your hands on Excel 2010 and then load the PowerPivot add-in. You could point them to this link so they could see it for themselves but chances are they can’t read anyway otherwise they wouldn’t be bothering you with such inane requests and they could have looked it up for themselves. Being a developer, of course, we know they need to have thing spoon fed to them otherwise they go off on a tangent and before you know it they come back with a prototype for some widget that no one needs or asked for.

At the end of the day it just comes down to communication, and I often like to remind people that DBAs are from Mars and developers are from Uranus and that’s why we have so much trouble communicating with one another.

Dear SQLDumbass: We have a manager here that claims to know everything about databases. In a meeting yesterday she insisted that we should be reviewing all the queries that hit all 5,000 databases all day long and making certain they are “doing what they should be doing, returning the right data, in the right amount of time”. What the hell does she mean by that? I am fairly new and didn’t want to ask any questions, but her request seemed rather odd. How am I supposed to know if a query is returning the right data? I mean, I could figure out if it is taking too long, but how am I to verify a result set? – Billy

Dear Jason: Billy, this is simple: she’s an idiot. Next time she asks about this just say “yes, we take a random sample of the queries each night and verify the results are as expected by sending the imaging the query through the capacitor inside of the query engine but before the optimizer has a chance to distribute the query across a bad plan.” She’ll have no idea what you meant but won’t want to look like an idiot in front of everyone so she’ll just agree with you and smile.

63 Billion Rows of Tablescans = Justified Stabbing

Dear SQLDumbass: What should I do if an analyst asks he needs to run 20 instances of an app that does tablescans 19 times against a table with 3.2 billion rows? Should I jump off a cliff for wondering what I did wrong to even meet a dumbass like this or stab him and give in myself to the police? – Mark V

Dear Mark: Stabbing is never the answer. Well, except maybe in this case. But instead of giving yourself in to the police, you should call the DBA Cops instead. I don’t know if they really exist, but if they did I am sure they would just show up, call for the coroner, and let you go with a warning. So, your first step here is to find the phone number for the DBA Cops. I looked but they don’t seem to be listed. And if they don’t exist yet, you should start your own DBA Cop unit. Then you could just arrest the guy for murdering the performance of the server and everyone comes out a winner.

Dear SQLDumbass: We have a developer here that got hired recently who wants to put everything she can find into separate schemas inside of one database. When we pointed out that an easier approach might be to just create a new database for all of the new objects she actually had the balls to chastise our collective 45 years of experience by saying “new databases are a waste of time, we just need new schemas.” We then replied that a schema is essentially a database inside of a database, so she wasn’t saving the world with her approach or anything and she got upset that we are not doing what we are told. So, my question for you today is this: what is the fastest way to make someone you work with disappear? – Jules

Dear Jules: Well, if your coworkers are anything like my dates, they will disappear fairly quickly and you won’t even have to wonder how it happened. Best if you just sit back and let this newbie self-implode, it shouldn’t be long before they are building table valued functions on top of views on top of functions to the point that performance comes to a halt after every five minutes.

Dear SQLDumbass: Why is Oracle so much better than MS SQL? – Jason M.

Dear Jason: I think you meant to ask ‘Why is Oracle so much more expensive than MS SQL’, and the answer is “I don’t know”. I suspect it’s like the time Martha Stewart started charging $20 for her $3 pies, she knew that people would buy them simply because of the perceived value but at the end of the day those people are still going to go home, have a slice for dessert, and get the runs.