follow the principle:
1. Optimize Your Queries For the Query Cache
2. EXPLAIN Your SELECT Queries
3. LIMIT 1 When Getting a Unique Row
4. Index the Search Fields
5. Index and Use Same Column Types for Joins
6. Do Not ORDER BY RAND()
7. Avoid SELECT *
8. Almost Always Have an id Field
9. Use ENUM over VARCHAR
10. Get Suggestions with PROCEDURE ANALYSE()
11. Use NOT NULL If You Can
12. Prepared Statements
13. Unbuffered Queries
14. Store IP Addresses as UNSIGNED INT
15. Fixed-length (Static) Tables are Faster
16. Vertical Partitioning
17. Split the Big DELETE or INSERT Queries
18. Smaller Columns Are Faster
19. Choose the Right Storage Engine
20. Use an Object Relational Mapper