forking in the situation you describe looks like an overhead to me. what if you optimize the structure of your database? are all columns in question indexed? must the contents your cgi-script delivers be taken from this database, or might a plain file solution be more performant?
--------------------------------
masses are the opiate for religion.