May 30th, 2007Yet Another SQL Battle
A few weeks ago I got into a bit of a debate with someone at my local coffee shop over effective RAID levels on a Consumer-grade NAS, and it seems that whenever we cross paths at the Starbucks we get into another heated discussion over the pros and cons of various technologies. At first I had thought this guy was just a “punk kid” who fancied himself a “l33t user”, but after some conversations I can see that he’s not completely full of testosterone and itching for a war of words. So I guess it comes as no surprise that I’ve almost started looking forward to these debates.
Today’s argument centred around which SQL database is best used in certain environments. Almost everywhere I’ve done work for, Microsoft’s SQL Server has been the database of choice. This platform is very mature, has great support, and a huge online community. Often times, this is the database of choice for many organizations as it’s easy to setup, deploy, and get programmers or administrators for. There are some things that I wish it had (like a parallel cluster capability), but all in all, SQL Server can give an enterprise everything they need, and then some, for their database needs.
I’ve looked at other solutions such as MySQL, PostgreSQL, Oracle and DB2, and I’m not against any of them for certain situations. DB2 is quite powerful when working with incredibly large databases (4+ Terabytes), and Oracle is pretty potent in its own right (though I’ve never used it in a production environment). MySQL 5 can now do some essential database functions like stored procedures, triggers and transactions (a database that can’t do this is not suited for any enterprise, in my opinion). PostgreSQL works incredibly well on embedded machines and other solutions where a tiny footprint is necessary, and it can scale up just like any commercial package should the need arise (though I’ve never had to take a PostgreSQL database past 20 MB in size).
So back on the debate, we argued two of the solutions discussed here: MySQL 5 vs. SQL Server (I guess from Versions 6.5 and up, since SQL Server has been able to do everything MySQL 5 can do and more since 1998). My opponent, let’s call him Ted, is working at a company here in Vancouver that had considered a move from SQL Server to MySQL. They use eight databases across nine applications and three websites totalling 87 GB. They also have a data warehouse of 60 GB.
Ted has developed several websites against MySQL since version 2 and feels that the platform is ready for a mission-critical environment. He outlined how some of the initial tests had gone for the administrators during some stress-testing sessions and everything worked without a hitch (after a few datatype conversions, of course). Using FreeBSD and the current MySQL 5 release, the old server that had been retired two years ago from running Windows2000 and SQL2000 was now keeping up with the newer boxes that have much more processing power. I’m sure the DBA’s were ecstatic with the results.
Unfortunately for Ted, his managers decided to keep SQL Server 2005 because they relied on stability, performance and the technical support. Because of the amount of resources that would go in to converting their systems to MySQL, and the costs involved with keeping skilled staff on hand, the company decided that the risks during migration were just too high.
I had to laugh when Ted mentioned the “costs involved with keeping skilled staff on hand”. Not because it was funny in itself, but because it’s something I’ve heard quite a bit everywhere I go. A business has to be able to find people to run things and, for the moment, it’s much easier to find Microsoft people. There are relatively few DBAs that are highly skilled in Open Source, and that’s a valid concern for any organization. Of course that said, there are more and more people coming up all the time with the skills required to operate and maintain these systems … but there just isn’t enough of them.
Like with most of our arguments, we didn’t really come to any final answer. Both SQL Server and MySQL are solid platforms to develop against, and both have their strengths and weaknesses. While Ted is vehement that MySQL would cost the company less and be a more enjoyable platform to work on, he actually does understand the business concerns. For my part, I can see why he would want to move the organization to the open source product as their future needs could take advantage of some of the new features in version 5 (such as the parellel clustering that SQL Server lacks).
On a technological basis, I’ve been very impressed with the recent versions of MySQL and even with PostgreSQL v8.2 (despite the lack of business-level development I’ve done against the platform). When you look at many sites with high technical demands, you’ll see that most of them run some iteration of MySQL and the costs are much lower than you’d get with SQL Server (no cost-per-processor or client licencing structures).
The open source databases have become very solid. When given the opportunity to choose between platforms, the decisions are often based on culture rather than the technology. There is alot of Microsoft culture in the business world and many corporate types feel safer since they know they can’t get fired (theoretically) for buying a Microsoft product.
As a personal disclaimer, I’ve been developing against various Microsoft platforms for the better part of 10 years. I really enjoy working on SQL Server and have even earned a MCDBA to show it. When I’m asked which platform is better, I usually default to the “it depends” answer … because it does depend. Each database has advantages in certain situations, and I’m not pompous enough to say one is better than the others in all instances. The real strength of a database comes from the people that maintain and develop the solution.















































My thought has always been - web application with a high number of reads, low number of writes, MySQL is hard to beat for the price/performance ratio.
The division I oversee for my employer is 100% Oracle and it’s uber-solid, wicked-fast (especially on Linux for some reason but it’s a dog on Windows) and extremely scalable. Oracle is a major PITA when it comes to licensing and the financial side of things of dealing with Oracle as a company (not to mention very pricey)
As a company, we have mission-critical, real-time OLTP applications that are absolutely POUNDED 24/7.
Outside of this office, my employer supports DB2, SQL-Server and Oracle and we have a DBA team that oversees the maintenance of all of these for our customers. One of the senior guys on that team actually works out of my office and is kind of an uber-guru, certified in all three…His take? Oracle and SQL Server are about dead even up to a point. At super high loads and transaction rates, SQL Server will not scale any further whereas Oracle will keep going provided you’ve got the hardware horsepower. And DB2? he just chuckles…not sure what that means but it can’t be good
Take it for what it’s worth as it’s someone else’s opinion (not mine) and all I’ve really ever worked with is MySQL and Oracle in any serious capacity…