Every CGI invocation is a separate DB connection.
If you are connecting more than once per invocation, you can save some time there.
If you want to hold the connection longer than a specific CGI invocation,
you need to run under mod_perl, or perhaps use a proxy connection,
as described in DBI::ProxyServer and DBD::Proxy. (I'm planning on writing a WT column
soon that shows how to do this. Maybe even today, since one is due!)