Re: performance issue with psycopg

Поиск
Список
Период
Сортировка
От Daniele Varrazzo
Тема Re: performance issue with psycopg
Дата
Msg-id CA+mi_8YHLsfJw6aXn992tMqQMUS+R5Ke3YNniFDyZBu7on+zXw@mail.gmail.com
обсуждение исходный текст
Ответ на performance issue with psycopg  (Sushant Sinha <sushant354@gmail.com>)
Ответы Re: performance issue with psycopg  (Sushant Sinha <sushant354@gmail.com>)
Список psycopg
On Mon, Dec 12, 2011 at 4:41 PM, Sushant Sinha <sushant354@gmail.com> wrote:
> I am using psycopg 2.4.2 and facing performance issue. An explain
> analyze of the query on the database shows 0.75secs. But when used
> through the psycopg layer I am seeing 1.5 secs. Any idea why the extra
> cost and how to optimize it?
>
> from psycopg2.extras import DictCursor
> from psycopg2.extensions import UNICODE, UNICODEARRAY
> psycopg2.extensions.register_type(UNICODE)
> psycopg2.extensions.register_type(UNICODEARRAY)
>
>
> cursor = dbCnx.cursor(cursor_factory=DictCursor)
> cursor.execute(query, params)
> results = cursor.fetchall()

What is the performance using only the basic cursor? And how big is
the returned set?

-- Daniele

В списке psycopg по дате отправления:

Предыдущее
От: Sushant Sinha
Дата:
Сообщение: performance issue with psycopg
Следующее
От: Sushant Sinha
Дата:
Сообщение: Re: performance issue with psycopg