views:

682

answers:

4

How cheap can MySQL be compared to MS SQL when you have tons of data (and joins/search)? Consider a site like stackoverflow full of Q&As already and after getting dugg.

My ASP.NET sites are currently on SQL Server Express so I don't have any idea how cost compares in the long run. Although after a quick research, I'm starting to envy the savings MySQL folks get.

+2  A: 

I know that stackoverflow has had problems with deadlocks from reads/writes coming at odd intervals but they're claiming their architecture (MSSQL) is holding up fine. This was before the public beta of course and according to Jeff's twitter earlier today:

the range of top 32 newest/modified questions was about 20 minutes in the private beta; now it's about 2 minutes.

That the site hasn't crashed yet is a testament to the database (as well as good coding and testing).

But why not post some specific numbers about your site?

George Mauer
It's a very small site relative to stackoverflow. Monthly stats would be 100K visitors, 500K page views running on a 800MB RAM VPS server.
vintana
+3  A: 

The performance benefits of MS SQL over MySQL are fairly negligible, especially if you mitigate them with server and client side optimzations like server caching (in RAM), client caching (cache and expires headers) and gzip compression.

japollock
+5  A: 

MSSQL Standard Edition (32 or 64 bit) will cost around $5K per CPU socket. 64 bit will allow you to use as much RAM as you need. Enterprise Edition is not really necessary for most deployments, so don't worry about the $20K you would need for that license.

MySQL is only free if you forego a lot of the useful tools offered with the licenses, and it's probably (at least as of 2008) going to be a little more work to get it to scale like Sql Server.

In the long run I think you will spend much more on hardware and people than you will on just the licenses. If you need to scale, then you will probably have the cash flow to handle $5K here and there.

Eric Z Beard
So I guess it's a matter of preference now?
vintana
I think MSSQL is slightly more polished, in all aspects. Some might argue with me, but performance is better than MySql. You have more options with indexes in MSSQL, and the optimizer is very transparent, so you can easily tune queries.
Eric Z Beard
+1  A: 

MySQL is extremely cheap when you have the distro (or staff to build) that carries MySQL Enterprise edition. This is a High Availability version which offers multi-master replication over many servers.

Pros are low (license-) costs after initial purchase of hardware (Gigs of RAM needed!) and time to set up.

The drawbacks are suboptimal performance with many joins, no full-text indexing, stored procesures (I think) and one need to replicate grants to every master node.

Yet it's easier to run than the replication/proxy balancing setup that's available for PostgreSQL.

Wimmer