MySQL Optimization and Performance Tips

    • Store IP addresses as INT, not CHAR – by using INET_ATON to convert from a string to an integer and by using INET_NTOA to convert from an integer to a string
    • Use non-persistent connection, since they are light-weight – much faster create than compared Oracle or PostgreSQL
    • Use the right storage engine; this means for example the ARCHIVE-engine for logs and other kind of INSERT-only operations, and the MEMORY-engine for fast in-memory data that should go away on server restart

More general MySQL optimization and performance tips are available in this Slideshow.

Comments off

Optimize MySQL for Low Memory Use

MySQL is a light database engine compared tomany of it’s rivals, but for some reason theDebian MySQL-server package contains a setup that makes it very heavy and memory consuming. The Debian version of becomes memory consuming because it comes with config file where MySQL’s most memory consuming and seldom used storage engine InnoDB is enable. As result of this the MySQL server instance uses around 100MB of memory while almost idle.

And here comes the optimization tip.

Since the InnoDB storage engine is used very seldom it can be disable in most cases and let the server save almost about 100MB of memory.

To disable to InnoDB storage engine add this to my.cnf (the default MySQLconfiguration files) in /etc/mysql/
skip-innodb

More on MySQL and Apache optimization and here

Comments off