Re: out of memory
- From: ron@xxxxxxxxxxxxx (Ron Savage)
- Date: Sat, 30 Dec 2006 08:53:18 +1100
On Fri, 29 Dec 2006 08:46:03 -0800, louis fridkis wrote:
Hi Louis
Thanks for your reply's. No, I'm not insulted. This is a quick-and-
dirty to generate some test data. But, I do appreciate the comments
since I am eager to improve.
Glad you're taking it the right way!
$rv = $cel_sth->bind_columns(\($elementresult_id, $element_id,
$quantification_id, $signal));
Why can't you use @rowvalues here?
while($cel_sth->fetch()){
@rowvalues = ($elementresult_id, $element_id, $quantification_id,
$signal); # # end # added & replaced #
my $printstring= "insert into $table_name values("; foreach my
$column (@rowvalues){ if (defined $column){ if($column =~
If you don't change the call to bind_columns(), why can't you use:
for my $column ($elementresult_id, $element_id, $quantification_id, $signal)
here? That saves copying the info into @rowvalues.
fetchrow_array(). I changed in the hopes that fetch() would work
better. The reason I think it tries to hold all the rows in memory
is because it works when the query in $sqlstring returns a small
number of rows, but fails with the "out of memory" error when it
returns a large number of rows.
That makes me think the problem really is you lack of RAM.
--
Cheers
Ron Savage, ron@xxxxxxxxxxxxx on 30/12/2006
http://savage.net.au/index.html
Let the record show: Microsoft is not an Australian company
.
- Follow-Ups:
- Re: out of memory
- From: Louis Fridkis
- Re: out of memory
- References:
- Re: out of memory
- From: Louis Fridkis
- Re: out of memory
- Prev by Date: Re: out of memory
- Next by Date: Re: out of memory
- Previous by thread: Re: out of memory
- Next by thread: Re: out of memory
- Index(es):
Relevant Pages
|