Re: Understanding memory usage - Mailing list psycopg

From Daniele Varrazzo
Subject Re: Understanding memory usage
Date
Msg-id CA+mi_8YMYqWNeXN=6Un0vAU8yFtoe5xqwLguPabBq72axHSMWg@mail.gmail.com
Whole thread Raw
In response to Understanding memory usage  (Damiano Albani <damiano.albani@gmail.com>)
Responses Re: Understanding memory usage
List psycopg
On Mon, Oct 28, 2013 at 9:28 PM, Damiano Albani
<damiano.albani@gmail.com> wrote:

> But what is the reason why Psycopg needs memory to just run a query, without
> fetching results?

Because the result is returned to the client as the response for the
query and is stored inside the cursor. fetch*() only return it to
Python.

The behaviour of actually getting the result on fetch*() is obtained
using a server-side cursor. The price you pay is more network
roundtrips and more resources used by the server.

-- Daniele


psycopg by date:

Previous
From: Damiano Albani
Date:
Subject: Understanding memory usage
Next
From: Damiano Albani
Date:
Subject: Re: Understanding memory usage