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

Tim Bunce <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.class-dbi
Message-ID <20070216101648.GA6797@ip-192-168-1-101.internal.terminal.newtec.be>
On Fri, Feb 16, 2007 at 12:37:15AM -0500, Edward J. Sabol wrote:
> Ed Sabol wrote:
> >> This sounds cool, but the change makes me nervous. Some DBMSs and/or DBDs
> >> (Sybase, for example) don't like unfinished statement handles hanging around.
> >> Could be problematic in a mod_perl environment?
> 
> Michael Schwern replied:
> > Yes, this is a concern but its no worse a regular active statement handle.
> > It depends on how long your iterators live, you just now have to treat them
> > like you would statement handles. Further discussion and enhancements on
> > that can be found in the ticket notes on rt.cpan.org.
> >
> > 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.

Tim.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.