There is a very slight advantage to statically linked libs, but it is so minor as to be less noticeable than say a 50MHz increase in CPU speed or adding more memory to a memory starved box.
The real key to making apache/php/sql work fast is the code you write and using a fast backend database that suits the task you're throwing at it.
If you're going to process hundreds of transactions a day, look at the fast commercial databases.
If you're going to mostly serve content, with little or no writing, check out mysql. It truly flies for simple database apps like dynamic web site generation for a marketing oriented site.
If you're going to take lots of weird data sets and twist them up ten ways till tuesday, look at postgresql, which is quite full featured, and nearly as fast as Oracle and other large databases, but free (speech|beer) and very reliable.
If you just need lots of easy fast look up tables, don't forget gdbm, the ultra fast berkely hash database most all Gnu OSes ship with.
Lastly, avoid dynamic content on heavily accessed pages by building them in the background if you can (i.e. once an hour build the page, then serve the static version.)
Lastly, learn to monitor your server with /server-status, top and a few other programs to see how it's holding up under both test loads and real loads.