Skip site navigation (1) Skip section navigation (2)

Re: [INTERFACES] perl interface

From: David Hartwig <daveh(at)insightdist(dot)com>
To: Cyril Ferrand <Cyril(dot)Ferrand(at)sophia(dot)inria(dot)fr>
Cc: pgsql-interfaces(at)postgreSQL(dot)org
Subject: Re: [INTERFACES] perl interface
Date: 1998-07-17 15:18:56
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-interfaces

Cyril Ferrand wrote:

> Hello
>         Is there someone who use perl interface to postgres to put a lot of data into
> a base.
> When my table are 40 meg my perl stop...

I'll take a good guess based on what little information you have provided.   I will
assume the you ran a query which requested a large chunk of that 40 meg table.   The perl
interface uses libpq.  And libpq slurps the entire query result into memory before
passing control back to the users code.   This is a weakness of this library.  May I
suggest that you declare a cursor and request the data in chunks. (fetch 100 rows at a
time)   If you use a cursor and fetch only one row at a time you may be disappointed in
the performance.

In response to

pgsql-interfaces by date

Next:From: Stefan OlssonDate: 1998-07-17 16:15:55
Subject: Segmentation fault
Previous:From: Byron NikolaidisDate: 1998-07-17 14:39:54
Subject: Re: [INTERFACES] Applixware ODBC Interface

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group