And also don't forget to index any columns that might benefit from it (basically anything used as a key).
In the past I built a complete site with Apache 1.3, mod_perl, template toolkit and PostgreSQL (using DBI to interface). It was fast, but only after adding a reverse-proxy in front of the mod_perl server. The only downside was the tremendous amount of memory this setup used. Actually there was another downside as well: it took me some time to figure out the intricacies of mod_perl. If you don't even know Perl to begin with, then the learning curve will be much higher for you.
There are alternatives to mod_perl (eg, SpeedyCGI) but I'm not familiar with them and so can't comment on that. Needless to say though, plain old CGI scripts can only go so far...