Monday, August 24, 2009

The database that don't scale

Many often I hear people saying that a database don't scale well. I have heard people saying it about mysql, ms sql server, postgresql and Oracle. It wouldn't worried me if it wasn't said by supposed IT / systems experts.

After analyzing their problems, the conclusion is always the same:
poor DB designs, bad written queries and lots of common mistakes like unnecessary cartesian products with big tables, use of unindexed fields in join and order by clauses, extensive use of like operator and many others. The problem you have then as a consultant is how you tell to a self-claimed expert that he doesn't understand a bit about databases; too often, this self-claimed expert will blame the DBMS, you or both.
But, how can one think that is more feasible that a particular performance problem comes from a widely-used DBMS rather than from his usage of it? Self-worshiping? Fear to admit a mistake?

Sometimes, our IT guy hires an expert on the DBMS used, that spends all his work time to solve these problems for lots of well-known customers. However, when the *real* DB expert finds the problem and proposes solutions (with more or less cost to apply), our super IT expert discuses it, saying again that the DB should perform no matter the query you run on it (ouch!). Then the problem is not only the DBMS, but you, too. Two questions come to my head when I'm in front of such situations:
1- How can you handle it, if "throwing away" the customer is not an option?
2- How can it be that this IT expert isn't fired immediately when his managers are aware of whole situation?, provided that:
- it's obvious that the problem is more probable to be on the usage side rather than on the DBMS.
- if the "great expert" hires an expert more capable than him, but after the services our mega-expert discuses the results, then is still his fault to select the right expert or simply to don't admit his disability.
- at the end, from a manager point of view, he hasn't solved the problem he's supposed to solve.

What is your answer to these questions, specially to the first one?

blog comments powered by Disqus