Wednesday, June 27, 2007

Why is it always the database?

When something is slow, why do we always point to the database? A computer system is so much more than "the application" and "the database". It's networks, routers, disks, memory, array controllers, middle-tiers, JDBC Drivers, Operating Systems, and client versions (which, usually comes round to "It's Oracle/MySQL, fix it"). Come to think of it, it's pretty amazing that we get decent performance at all.

Everybody is guilty of it from the novice to the experience person who knows better. Heck, I am sometimes guilty of it myself.

I'll get a call, "Application XYZ is slow, is the database OK?"

"Let me check."

A couple minutes later I indicate everything is fine on my end. I hear three days later that "XYZ was slow because of the database". Argh. Next time that person needs help tuning a query he'll get pointed to the documentation for EXPLAIN PLAN.

Why do we always point to the database first? Is it because the database is usually the guilty party? Or do we point fingers at what we don't understand?


Mike said...

Some people just point to whatever isn't in part of their responsibility.

John Hurley said...

Would you expect a developer to say that "well I implemented into production some SQL that wasn't written and designed as well as it could have been and my limited amount of testing did not find any problems with it until I installed it into production"?

Now really Jeff. You know better than that.

Anonymous said...

In my experience, when you hear from users that "the database" is slow, they could be talking about anything. They call the application "the database".

Their PC running slow? Database. Network bogged down? Database. Web server have too much load? Database. Actual database has too much load? Well, yes, that's the database too.

Joel Garry said...

why do we always point to the database?

Because we're too scared of the DBA to point directly?

Don said...

Probably 10% because it is usually the cause and 90% because they don't understand it.

CarlosAL said...

I think it's like car races (or motorbike races):

When bad results, its always 'the engine' (never the tyres, suspension, driver/rider...)




maol said...

It's because the Database is the application's entry point into the IT infrastructure (for data centric apps at least). They blame network, storage, server or Unix issues to the database because that's what they're interested in, forgetting about the rest of the infrastructure stuff supporting the Database.
And then, obviously, it can also be the case of blame the messenger, if the real reason was bad SQL...

Chen Shapira said...

I loved the idea of punishing the developers by giving them Oracle documentation.