MySQL’s poor performance forced me into writing crazy cache schemes. 5.0 was an unstable hunk of crap. MySQL would barf with random table crashes that would bring down my website. I still don’t understand why a table should randomly crash!
When I finally migrated to a better database system and added foreign keys, I discovered that MySQL’s was happily letting “CoryKING” and “coryking” exist in my unique username column. I had to sift through almost 100 usernames to figure out which account was the real one. Had I been using the new database server in the first place, this issue would have been caught before it could corrupt my database.
Bottom line?
MySQL is overrated. I would not recommend its use in any kind of production environment. There are much better alternatives.
Nov 26, 2007, 04:27PM PST | 1 comment
First, been there. Used it. Pissed my users off with crazy “I posted a comment, but it doesn’t load” bugs. Dumped MySQL for PostgreSQL. Put more load on PostgreSQL with views and complex queries. Found the system was faster. Removed all of my memcached code. Using views, removed a buttload of SQL in the code too. Fell in love with PostgreSQL.
My Bold Hypothesis:
- It makes your code brittle and buggy in ways that are hard to replicate or fix.
- These bugs are usually very annoying and confusing to users.
- Can cost more in developer time than buying better hardware and software.
- People don’t pay for performance optimizations. Memcached is a performance optimization.
- Your developers could have been working on features, not cache systems.
- It is often a symptom of using an inferior, but for some reason very popular, database system…
- ... that doesn’t handle complex queries worth a damn.
- Did I mention that you are gonna buy the new database server anyway? Memcached just stalls the inevitable.
My Hope:
- I can scale my software (mozicode) to an amazing amount of traffic by proper query tuning, proper database design and proper hardware.
- Throwing hardware at the database is cheaper than using developer time.
- There is nothing wrong or evil with paying for database software. Outgrowing PostgreSQL is a good thing. SQL Server or Oracle are more than happy to help scale to the highest levels of interweb coolness.
- I hope I can use PostgreSQL for quite a while though :-)
- I hope to never use memcached outside of very limited and trivial optimizations.
My Fear:
I’m wrong :-)
Disclaimer: I used memcached for one query that gets the story count for pagenation. COUNT queries on InnoDB or PostgreSQL aren’t very fast. There is no doubt that memcached has its place for certain kinds of queries. I’m talking more about using memcached in front of every database query.
Nov 26, 2007, 03:53PM PST | 0 comments
but haven’t done w2 work for two years :-) Does that count?
Does it help that I’m going to finally be getting the proper hardware and website to actually sell my product?
Nov 26, 2007, 03:30PM PST | 0 comments