DBI problems with Pg - Mailing list pgsql-general

From yohan tordjman
Subject DBI problems with Pg
Date
Msg-id 00061312553600.24521@yohan.ftd.fr
Whole thread Raw
List pgsql-general
hi,

I'm using postgresql v7.0.2 on Redhat Linux 6.2 with Perl's DBI
and DBD::Pg ... I've got a table ('annonces'), with 30 columns
and 100 000 rows .

The following script will work fine when launched on the Pg box;
but when launched from a remote computer, it will take hours to
execute, and finally hang the script. Though, we have a 100mbit
LAN. I've tried to put a limit in my select query, and then i get
a result -- it still takes a long time, yet.

Have anyone experimented the same behavior ?
Am i missing some FAQ or something ?

Thanks id advance.
Yohan Tordjman

My script:
--------------------------------------cut
use strict;
use DBI;

my $dbh = DBI->connect("dbi:Pg:dbname=xxxx;host=xxx", "user", "pass");
my $query = "SELECT * FROM annonces";

my $sth = $dbh->prepare($query);
$sth->execute;

while ( my @rows = $sth->fetchrow_array ) {

# statements.....

}

$sth->finish;
$dbh->disconnect;
--------------------------------------------cut


pgsql-general by date:

Previous
From: "chongmc"
Date:
Subject: c compiler cannot create executables
Next
From: Thomas Lockhart
Date:
Subject: Re: Compression on ODBC?