Go to the first, previous, next, last section, table of contents.


How compiling and linking affects the speed of MySQL

Most of the following test are done on Linux and with the MySQL benchmarks, but they should give some indication for other operating systems:

On Linux you will get the fastest code when compiling with pgcc and -O6. To compile sql_yacc.cc with these options one needs 180M memory as gcc/pgcc needs a lot of memory to make all functions inline. One should also set CXX=gcc when configuring MySQL to avoid inclusion of the libstdc++ library.

One gets the fastest executable when one links with -static. Using Unix socket instead of TCP/IP to connect to a database gives also better performance.

The MySQL-linux distribution that is distributed by TCX is compiled with pgcc and linked staticly.


Go to the first, previous, next, last section, table of contents.