The Database Is the Last Line of Defence
Application-layer validation can have bugs. The database constraint cannot.
DevDick / Field notes
Engineering decisions, research, setbacks and progress. A closer look at what changes—and what it means for people building software.
Application-layer validation can have bugs. The database constraint cannot.
Elasticsearch is powerful. It is also heavyweight. For many use cases, MySQL full-text search is sufficient and much simpler to operate.
Deploying a schema change to 50 million rows is not the same as 50,000. Here is the discipline that keeps production healthy.
For complex financial workflows in high-throughput systems, stored procedures remain the most reliable tool I have.
A loan summary query took 60 seconds for two years. After a schema redesign and two indexes, it ran in 4 seconds.
Both are excellent. Neither is universally better. A practical comparison from someone who has shipped on both.
Most slow queries are slow because the right index does not exist.
The quality of your database schema is the ceiling of your entire application.
Read new published articles in your RSS reader. No account needed.
Good software starts with better questions.
Explore my work