6 ms·
The OP's suggestions are pretty bad, as jasonkester points out. But for a specific class of problems (ones that are both performance or JOIN intensive and requi
by m0th87 17y ago
The OP's suggestions are pretty bad, as jasonkester points out. But for a specific class of problems (ones that are both performance or JOIN intensive and require the awesome indexing/sorting capabilities in SQL solutions), schema-less MySQL, when done "correctly" is awesome. I designed an application that needed to do graph traversal in real-time, so normalized SQL wasn't an option for me. I tried various NoSQL solutions, but they all either lacked important features or ran insanely slow. I ended up settling with a design similar to how FriendFeed uses MySQL:
http://bret.appspot.com/entry/how-friendfeed-uses-mysql http://bret.appspot.com/entry/how-friendfeed-uses-mysql
Not only was the solution faster, but it made code so much more concise, because you can just serialize Python objects to the database rather than write a huge database abstraction layer. For me this is even more valuable than the performance ramifications.
If you're using Python+MySQL, be sure to check out Tornado's database wrapper (http://github.com/facebook/tornado/blob/master/tornado/database.py http://github.com/facebook/tornado/blob/master/tornado/datab...) because it handles all sorts of sharp corners that straight up MySQLdb won't (like working with binary data, reconnecting when necessary, etc.)
- bdotdub 17y agoFor the Rubyists out there, here is a Ruby library based off of the same blog post: http://github.com/jamesgolick/friendly http://github.com/jamesgolick/friendly
- reynolds 17y agoI'd be interested in comparing notes if you are. I implemented something similar to what Bret Taylor described. Mine is pretty hacked and alpha but I've used it in production. http://github.com/davidreynolds/simplestore http://github.com/davidreynolds/simplestore