in reply to calling one cgi script from another
Another thing to do would be to run the script once, prepping the page. Then have the script check the timestamp of the latest run and if it's let's say under 5 mins, then present the cached version. If it's older than 5 mins, fetch the stuff from the DB. Also, if 1 guy clicked on it then the 2nd guy will benefit from the 1st guy's request, instantly.