Where are the selected rows stored using fetchall_arrayref
- From: Peter.Loo@xxxxxxxxxxxxxxxxxxxxxxxx (Peter # PHX Loo)
- Date: Mon, 22 May 2006 16:35:05 -0700
Hi,
I was wondering if someone can tell me how, where and what Perl DBI
stores the data returned from fetchall_arrayref. For example: if I
issues a SELECT statement such as "select a.col1, b.col2, c.col3 from
someTable1 a, someTable2 b, someTable3 c where someCondition". From
this I get an array reference. I understand that the array references
are pointers, but where are these pointers stored.
I will be using Perl DBI to dump approximately five billion rows through
a socket to another server where another program will bulk load to a
database server.
Here is an example of what I am going to be doing:
unless ($arrayref = $sth->fetchall_arrayref()) {
$MESSAGE = "sub_fetchallArrayref() - $DBI::errstr";
$STATUS = $FAILURE;
sub_exit();
}
my $sock = new IO::Socket::INET->new(PeerPort => $port, Proto =>
$proto, PeerAddr => $node);
if (!$sock) {
print STDERR "Unable to open socket to $node at port $port using
protocol $proto.\n";
return $FAILURE;
}
foreach $row (@{$arrayref}) {
$piped = join($delim, @$row);
$sock->send($piped) || return $FAILURE;
}
My concern is I might run out of memory. Hope someone can shed some
light.
Thanks in advance.
Peter
This E-mail message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply E-mail, and destroy all copies of the original message.
- Follow-Ups:
- Re: Where are the selected rows stored using fetchall_arrayref
- From: Markd
- RE: Where are the selected rows stored using fetchall_arrayref
- From: Steve Baldwin
- Re: Where are the selected rows stored using fetchall_arrayref
- Prev by Date: Identify PID for remote database handle
- Next by Date: RE: Where are the selected rows stored using fetchall_arrayref
- Previous by thread: Identify PID for remote database handle
- Next by thread: RE: Where are the selected rows stored using fetchall_arrayref
- Index(es):