List:MySQL and Perl« Previous MessageNext Message »
From:Matija Grabnar Date:October 20 1999 7:25am
Subject:Perl interface and BIG tables
View as plain text  
Is there any way to force the perl DBI interface to fetch from
mysql record by record, rather than building a table in memory?

The other day we needed to move a large part (3E6 records) of our database 
from one server to another. We thought we could do it with a simple
perl DBI program which would open mysql connections to both servers
and do a record-by-record transfer. However, the select ran and ran and
the size of the process grew and grew, which says to me that DBI was 
building the table in memory before passing it to my client.

I realize this is desirable in a lot of cases where speed is more important,
but surely other people have come across situations where ammount 
of used RAM was important, too (busy CGI servers come to mind).

Is there any way to tell DBI to sacrifice speed in favor of saving memory?
I looked all through the DBI manpage but couldn't find anything, but I 
understand the C API makes this possible...

Best regards,
     Matija

-- 
"My name is Not Important. Not to friends. 
    But you can call me mr. Important"  - Not J. Important 
Matija.Grabnar@stripped


Thread
Perl interface and BIG tablesMatija Grabnar20 Oct
Re: Perl interface and BIG tablesJochen Wiedmann20 Oct