20 MySQL Best Practices
Dejo un link con 20 consejos para mySQL con 20 MySQL Best Practices, aqui un resumen y el post original donde explica el porqué de cada una… muy bueno.
- Optimize Your Queries For the Query Cache
- EXPLAIN Your SELECT Queries
- LIMIT 1 When Getting a Unique Row
- Index the Search Fields
- Index and Use Same Column Types for Joins
- Do Not ORDER BY RAND()
- Avoid SELECT *
- Almost Always Have an id Field
- Use ENUM over VARCHAR
- Get Suggestions with PROCEDURE ANALYSE()
- Use NOT NULL If You Can
- Prepared Statements
- Unbuffered Queries
- Store IP Addresses as UNSIGNED INT
- Fixed-length (Static) Tables are Faster
- Vertical Partitioning
- Split the Big DELETE or INSERT Queries
- Smaller Columns Are Faster
- Choose the Right Storage Engine
- Use an Object Relational Mapper
- Be Careful with Persistent Connections


