On Sat, Jun 16, 2007 at 02:09:44AM -0400, Rudy Lippan wrote:
> On Thu, 14 Jun 2007, Greg Sabino Mullane wrote:
> >No significant memory or computation cost. It's a fairly cheap
> >optimization.
> >
> >It's probably fine to use it all you want.
>
> That depends, I can think of some instances were you would not want to use
> it:
>
> for (1..100_000_000) {
> eval {
> my $sth = $dbh->prepare_cached(q{
> INSERT INTO mytable (number) VALUES ($_);
> });
> $sth->excute();
> }; if (my $e = $@) {
> die "Hmm there was an error... Did you forget to create mytable?
> $e";
> }
> }
That's pretty obvious. At least _I_ wouldn't expect it to be a win in
such circumstances. I currently have only 51 queries in my application.
--
Make April 15 just another day, visit http://fairtax.org