in reply to
Retrieving a MySQL query in chunks
What you probably want is fetching the data with asynchrounous calls.
You should have a look a POE::Component::SimpleDBI on cpan.
Thanks
Eriam
Comment on
Re: Retrieving a MySQL query in chunks
Replies are listed 'Best First'.
Re^2: Retrieving a MySQL query in chunks
by
perrin
(Chancellor)
on Sep 12, 2007 at 14:33 UTC
That doesn't really solve the problem. The forked process still ends up loading the entire result set into memory at once. The answer for large queries is to set mysql_use_result.
[reply]
Re^3: Retrieving a MySQL query in chunks
by
eriam
(Beadle)
on Sep 13, 2007 at 06:39 UTC
Sure it will load the stuff in memory (so yes he may need a lot of it), but the application won't freeze which is also what he was trying to achieve.
Eriam
[reply]
In Section
Seekers of Perl Wisdom