- use ENUM whenever possible
- do not be too generous with the varchar length
- NULL columns take more space and make computation harder – avoid using them, use empty strings or zeros.
- InnoDB-specific. Use a surrogate key which is a primary key whose value is not derived from application data; it is simply an AUTO-INCREMENT integer
- use indexes wisely (accordingly to the queries you are going to use). Benchmark your choice.
- chopping up query – if a query takes too long to execute (for example a query for purging) you should do it bit by bit in a loop. In this way you will avoid to lock tables for long time
- sometimes 3 one-table queries performs better that a query with 3 joins. This is called in-application join. In this way you have more change to use cache, locks will be shorter, you can store the tables on different servers (scalability) and you can reduce row access (it is not always easy for MySQL to optimize complex queries)
-
Search
Categories
-
Linux, PHP, LAMP, The Web in a blog- Android – how to develop directly on a phone
- Android drawable default icons – they are free to use
- Android how to read and write files
- Uncompress on the fly when copying a file from a remove location with scp
- Setting up an encrypted volume on an external hard drive on CentOS
- Linux bash – tar tricks
- Implement Selenium tests
- Using a downloaded package without IDE in Java
- CSS selectors optimisation
- Ubuntu Linux on Acer Aspire AO751h
Tag Cloud
alarm array backup begin button character commercial constants coppermine CSV DVD eclipse ecommerce email email server expect firefox font foreach formatting fstab ftp GMail gnome keyboard Lucene marketing memcached mount plugin profiling protect regexp scp Selenium SEO sftp split svn tar utf utf8 Vbulletin Virtual Server Web Dev Security
