02 March 2011

OMG What Do I Do? - "The database is slow!"

Okay, so it's finally happened.  I was sitting at my desk, peacefully catching up on all my work, finding out what's happening in the world, thinking to myself, "Hey, this isn't so bad. Sr. DBA D just left for New Orleans, Sr. DBA H is in New Zealand on vacation, it's actually not bad.  Just basic work, writing meeting minutes, reading about database philosophy, checking out reports..."  So there I was, peaceful and happy, noodling around trying to figure out why the good Pink Floyd wasn't available on vinyl, when suddenly it happened.  A client just popped up at my desk with a panicked look on her face.  "The database, it's slow! It's twice as slow as it was last week! Getting worse!"

Oh crap.  This is where I get the horrible sinking feeling in my stomach.  Database tuning. Like, if I didn't have a really bad weakness of not knowing anything, I'd have to say that database tuning is probably my absolute worst weakness.  I mean, you have to actually know something about databases in order to tune them.  Now I know why some DBAs keep vodka in their desk.

I immediately look over at her, and try and compose myself:

Me:  "Hi! I am sorry to hear that. Slowness, huh? Has this happened before? Well, what did Sr. DBA  H do in the past?"

Client: "I dunno!  Sr. DBA H just did something. Maybe he analyzed tables? Yah, I think he did that. Can you do that? Can you analyze tables?"

Me: "Of course! I can analyze tables.  I can run dbms_stats."  (this is like actually the one thing I can do)

So then I swivel around and log into the machine I need to look at the database on.  My little frog icon comes up, ribbits and then asks me for a license. WHAT?  Doesn't this pc have Toad as a universal user? Apparently not.  So then I go hit up Embarcadero. Another license prompt.  I turn around and look at my client who is twisting her fingers and shooting daggers at me.  OMG.  I can't even open a tool to look at the databases.

I weakly smile: "Hang on.."

Client: "Can we go talk to other DBAs?"

Me: "Um, I think that would be a good idea."

So then my client and I go tromp over to the nearest DBA desk, Sr DBA DH, not to be confused with Sr. DBA D or Sr. DBA H.

Me:  "I can't get into Toad, Embarcadero or anything else, can you pleeeeeze look at ABCD database? It's slow."  (as soon as I say this, I see Sr. DBA DH go into DBA mode.

Sr. DBA DH:  "Well, slowness can be caused by a lot of different things.  It may not necessarily be fixed by running statistics.  In fact, it could be... (whereupon he whips out his fingers and starts counting out all the things that it could be...)"

Client: momentarily transfixed then immediately asks about stats.  She is really convinced that stats is the fix. Maybe it is.  I have no idea.  This is when I get the understanding there is no quick fix for database slowness.  Sr. DBA DH starts running stats after expounding for a long time that this probably isn't going to fix anything. I am learning that we should probably do what the client wants us to do, if it doesn't hurt the database, because maybe it shows we are listening to them.  Maybe it's PR. I don't know.  All I know is, I have a client that has a slow database. And she wants me to fix it.  And I have no idea what the hell to do....

(to be continued....)

1 comment:

  1. Ha! I have no idea what you are talking about.. but I still love it. I can so imagine this becoming an epic novel for DBAs around the world.

    ReplyDelete