Re: libpq, PQexecPrepared, data size sent to FE vs. FETCH_COUNT - Mailing list pgsql-hackers

From Abhijit Menon-Sen
Subject Re: libpq, PQexecPrepared, data size sent to FE vs. FETCH_COUNT
Date
Msg-id 20100525115618.GA929@toroid.org
Whole thread Raw
In response to Re: libpq, PQexecPrepared, data size sent to FE vs. FETCH_COUNT  (Alex Goncharov <alex-goncharov@comcast.net>)
Responses Re: libpq, PQexecPrepared, data size sent to FE vs. FETCH_COUNT
Re: libpq, PQexecPrepared, data size sent to FE vs. FETCH_COUNT
List pgsql-hackers
At 2010-05-25 07:35:34 -0400, alex-goncharov@comcast.net wrote:
>
> | Where does the result set (GBs of data) reside after I call
> | PQexecPrepared?  On BE, I hope?

Unless you explicitly declare and fetch from an SQL-level cursor, your
many GBs of data are going to be transmitted to libpq, which will eat
lots of memory. (The wire protocol does have something like cursors,
but libpq does not use them, it retrieves the entire result set.)

-- ams


pgsql-hackers by date:

Previous
From: Yeb Havinga
Date:
Subject: Re: libpq, PQexecPrepared, data size sent to FE vs. FETCH_COUNT
Next
From: Magnus Hagander
Date:
Subject: Re: JSON manipulation functions