On Tue, 15 Aug 2000, Tom Mornini wrote:

> It is my understanding of the DBI docs that you only need to call
> $sth->finish when you DON'T fetch all the rows that the $sth has ready to
> return.
> 

>From "Writing Apache Modules with Perl and C":
  "You should still call finish() at the end of each series of fetches,
even though you are going to reuse the statement handler.  Failure to do
so can lead to memory leaks."

If I remember correctly, it also frees up any resources used by the
database (depending on db) for the query, like for sorting, joining,
etc.  But I can't quote a source for that one.

>From my point of view, it never hurts to call finish()...

Jay Jacobs

Reply via email to