Re: Understanding memory usage

Поиск
Список
Период
Сортировка
От Daniele Varrazzo
Тема Re: Understanding memory usage
Дата
Msg-id CA+mi_8YMYqWNeXN=6Un0vAU8yFtoe5xqwLguPabBq72axHSMWg@mail.gmail.com
обсуждение исходный текст
Ответ на Understanding memory usage  (Damiano Albani <damiano.albani@gmail.com>)
Ответы Re: Understanding memory usage
Список 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 по дате отправления:

Предыдущее
От: Damiano Albani
Дата:
Сообщение: Understanding memory usage
Следующее
От: Damiano Albani
Дата:
Сообщение: Re: Understanding memory usage