Fetch-on-demand iterators (was Re: [CDBI] Make CDBI go fast)

Michael G Schwern schwern at pobox.com
Thu Feb 22 03:00:26 GMT 2007

Tim Bunce wrote:
>>> One possibility is to move executing the statement handle into the iterator
>>> so it doesn't even execute the query until you've asked for the first
>>> object. This would make it safer to hand around iterator objects.
>>> I'm using this in a mod_perl environment with no problems yet.
>> Yeah, but you're not using Sybase with mod_perl, and I am, so hence my
>> nervousness.
> I think enabling mysql_use_result would raise the same issue for MySQL,
> so it should be possible for Mr Schwern to check for problems while
> developing.

I've taken this all into account and have made sure the statement handle is finished when the iterator is destroyed.

More information about the ClassDBI mailing list