Are you connecting to more than one database? If not, you can just connect once and prepare multiple statement handles on the one database handle. In fact, if your statement handles need not overlap, you could re-use your $sth lexical for new statements, too.