TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

3 Common Rails + MySQL Mistakes

6 pointsby mattybover 14 years ago

2 comments

ethangundersonover 14 years ago
The first item in the list really bugs me. It's not enough to just tell me not to do something, teach me why it's bad. That way, I can explain to others why this is a mistake instead of just regurgitating the same explanation of 'it's a performance disaster'.
Pooterover 14 years ago
None of these are Rails specific. Don't stick session data in a relational db if you can put it in memcache or someplace similar. Also, MySQL's query optimizer and execution engine suck (SQL server, DB2, Oracle, and PostgreSQL all handle in() queries with select statements just fine).<p>The select for update thing, though, sounds like a table type selection issue. Doesn't innodb handle locking at roughly row level (maybe db page)? Seems like that one is for people who stick with MyISAM. If you're doing concurrency sensitive stuff, pick a better storage engine (or more robust db).