Re: Newbie DBD::Pg question

From: Gilles DAROLD <gilles(at)darold(dot)net>
To:
Cc: PostgreSQL general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Newbie DBD::Pg question
Date: 2001-07-06 17:41:15
Message-ID: 3B45F83B.F55F722F@darold.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

Extraction of large amount of data is not realistic especially with
CGI, then DBI/DBD::Pg always return all data received from a query
so if you don't want to tired your machine, the better way is to use
cursor in a transaction (or query) or the LIMIT+OFFSET keywords.

Regards

Gilles DAROLD

Mithun Bhattacharya wrote:

> Just started on postgres a few days back and was having a few questions
> about the perl interface to it. According to perldoc DBD::Pg
> ----------------
> Cursors
>
> Although PostgreSQL has a cursor concept, it has not been
> used in the current implementation. Cursors in PostgreSQL
> can only be used inside a transaction block. Because only
> one transaction block at a time is allowed, this would
> have implied the restriction, not to use any nested SELECT
> statements. Hence the execute method fetches all data at
> once into data structures located in the frontend
> application. This has to be considered when selecting
> large amounts of data !
> -----------------
> Frankly speaking I am not sure what the Author is saying here. Anybody
> cares to point me in the right direction ??? I do have to extract large
> amount of data but I am not sure whether it affects me or not.
>
> Mithun
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/users-lounge/docs/faq.html

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Philip Molter 2001-07-06 17:54:44 Re: HUPing a database
Previous Message Peter Eisentraut 2001-07-06 17:32:09 Re: query syntax change?