Re: [GENERAL] BIG Data and Perl

From: "Roderick A(dot) Anderson" <raanders(at)altoplanos(dot)net>
To: Andy Lewis <alewis(at)roundnoon(dot)com>
Cc: pgsql-general(at)postgreSQL(dot)org
Subject: Re: [GENERAL] BIG Data and Perl
Date: 1999-10-15 16:17:16
Message-ID: Pine.LNX.4.04.9910150910280.18776-100000@asgard.altoplanos.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, 15 Oct 1999, Andy Lewis wrote:

> -- cut --
> $result = $conn->exec("$query");
>
> $ntuples = $result->ntuples;
> print STDOUT "Total: $ntuples \n\n";
>
> while ( @row = $result->fetchrow ) {
> do some stuff here...ie, open file and read
> }

I've seen similar effects when working with arrays. I'm not sure since
I'm still new to PostgreSQL but would a foreach loop work.

foreach @row ( $result->fetchrow ) {
@columns = @$row;
}

I seem to remember reading somewhere that foreach's are faster and more
memory conservative. (Been reading too many perl books lately so I can't
say where I saw this.)

Rod
--
Roderick A. Anderson
raanders(at)altoplanos(dot)net Altoplanos Information Systems, Inc.
Voice: 208.765.6149 212 S. 11th Street, Suite 5
FAX: 208.664.5299 Coeur d'Alene, ID 83814

In response to

Browse pgsql-general by date

  From Date Subject
Next Message DSDeurne automatisering 1999-10-15 16:55:48 Cobalt Raq2
Previous Message Brett W. McCoy 1999-10-15 16:10:07 Re: [GENERAL] Convert MS access database into PostgreSQL