Re: JDBC and Portals . Clarification

Поиск
Список
Период
Сортировка
От Kris Jurka
Тема Re: JDBC and Portals . Clarification
Дата
Msg-id Pine.BSO.4.56.0503011845410.20222@leary.csoft.net
обсуждение исходный текст
Ответ на JDBC and Portals . Clarification  (Dave Smith <dave.smith@candata.com>)
Список pgsql-general

On Fri, 25 Feb 2005, Dave Smith wrote:

> Is a portal using the V3 protocol the same as a cursor? I am trying to
> debug a slow query and I want the JDBC driver to use the cursor syntax.
> It says it is using a portal but the performance seems like just a
> regular sql statement.
>

Yes, portals and cursors are pretty much the same thing.  Depending on
your query using a cursor may not actually speed it up, consider SELECT *
FROM tab ORDER BY col; The whole result must be sorted before any row is
returned.  What it will do in this case is just reduce the memory
consumption on the client by not fetching all the rows at once.  Also
please check the list of restrictions for the JDBC driver to actually use
a portal/cursor backed ResultSet:

http://jdbc.postgresql.org/documentation/80/query.html#query-with-cursor

Kris Jurka

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

Предыдущее
От: Chris Kratz
Дата:
Сообщение: Re: Novice Question
Следующее
От: Christopher Browne
Дата:
Сообщение: Re: Trigger email?