[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Perl DBI/DBD MySQL



Jeg har observeret at når jeg laver dette stykke kode:


my $sth = $dbh->prepare("select * from table");
# og tabellen indeholder meget data ( 1GB )
# så vil denne:
# allokerer 1GB i maskinens hukommelse før den går videre.
$sth->execute();

# hvorimod jeg troede at den først hentede data fra databasen når jeg 
# gav mig til at iterere hen over dem med:

while(my $row = $sth->fetchrow_hashref()){

}

Har jeg glemt en option til DBI/DBD eller er det bare sådan det skal
virke?

Jeg syntes det virker meget uhensigtsmæssigt.

-- 
./Jesper Krogh, sslug@sslug, Jabber ID: sslug@sslug
Jabber - Det eneste instant messaging system der sikrer DIT privatliv. 



 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 22:43 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *