sql vs. sql

Once again, UPHPU has had a minor stir about which database is faster / better / stronger, PostgreSQL or MySQL. All fanboyism aside, who really cares?

You want to know the way to *really* speed up your database? Normalization is probably going to be the largest factor. After that, use views, stored procedures, indexes, transactions and well-written queries, and your database is going to fly amazingly fast.

At work we have a large server we call “Zeus” because it is incredibly large. I won’t even go into specs because you wouldn’t believe me even if I told you. When I first started working here, the database running on it was incredibly slow. At first I blamed it all on the database software we are using (you can search my blog if you really wanna know which one it is. Hint: it’s neither of the two mentioned above), but as we cleaned up the databases and tables by removing columns that were complete cruft and then doing everything I mentioned above, this puppy flies. In fact, our “dev” database, which is running on nothing more than an Athlon XP 1800+ runs just as fast as our beast-monster does.

That’s how you get a fast database — doing things the right way. Who would have thought?

I have to apologize for the elitist feel of this post, but my point is this … the only magic bullet in improving performance is going to be quality code and design. Just replacing your database with something else isn’t going to make the speed fairy sprinkle your application with love.

About these ads

3 Comments

Filed under Databases

3 responses to “sql vs. sql

  1. Dude, I believe you. Well, I’ve seen it, too. Imagine that: do things right and they work better. What really sucks is that M$ can get away with hugely bloated resource hog software which *APPEARS* to be just as efficient. But, as you know from first-hand experience, if you just learn about some basic optimization techniques, that’s really the way to go.

  2. Well, see that’s the thing.

    “use views, stored procedures, indexes, transactions and well-written queries”

    Most of the people annoyed at MySQL are annoyed at it because working stored procedures and triggers came so late in the game. Arguments are generally set about why a database does not have standard SQL features.

  3. I didn’t mean to stir the postgres/mysql when I posted that message. Sometimes I forgot people treat OSes, databases, browsers, etc like religions. It did prompt me to re-evaluate my DB schema and I have notice a great improvemnet. THANKS!!!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s