- 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.
Installing Oracle on Ubuntu is fairly easy, since Oracle has created a Debian and Ubuntu package repository, so it is possible to download and install the Oracle database softwareusing apt-get and aptitude.
Howto use the Oracle Debian and Ubuntu Repository:
Add the following lines to the /etc/apt/sources.list
# Oracle Repository
deb http://oss.oracle.com/debian unstable main non-free
Update the package repository database with:
cc@ray:~$ sudo apt-get update
Now you should be able to install the following Oracle software:
Install the Oracle Express packages
sudo aptitude install oracle-xe oracle-xe-client
sudo /etc/init.d/oracle-xe configure
Access the nice Oracle web interface by pointing your Firefox to:
The installation process might report that the Oracle packages are not gpg signed, but you should be able to install the packages anyway.
You can avoid this report by added the Oracle gpg-public key to your apt-key chain
wget http://oss.oracle.com/el4/RPM-GPG-KEY-oracle -O- | sudo apt-key add -
Read more on Oracle and Debian and Ubuntu here