Re: Postgres 8.2 and setFetchSize

Поиск
Список
Период
Сортировка
От Oliver Jowett
Тема Re: Postgres 8.2 and setFetchSize
Дата
Msg-id 46F12313.3030401@opencloud.com
обсуждение исходный текст
Ответ на Postgres 8.2 and setFetchSize  (Frédéric Houbie <fh@ionicsoft.com>)
Список pgsql-jdbc
Frédéric Houbie wrote:

>         st.setFetchSize(Integer.parseInt(args[0]));
>         System.out.println("FetchSize : " + st.getFetchSize());
>       String q="SELECT a FROM SValues WHERE  Name = 'title'";

> It always take the same time (long time) whatever value I pass to this code for the FetchSize.

Fetch size does not directly affect query speed, it affects the number
of results the driver retrieves at once. If you've got a query that is
slow and takes a long time to return any results at all, changing the
fetchsize isn't going to help.

Since it sounds like you are getting quite different results on two
different server installations I would guess that the two databases are
not actually identical. Perhaps one is using an index but the other
isn't? Try the queries via psql, use EXPLAIN, etc.

-O

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

Предыдущее
От: Frédéric Houbie
Дата:
Сообщение: Re: Postgres 8.2 and setFetchSize
Следующее
От: Oliver Jowett
Дата:
Сообщение: Re: Postgres 8.2 and setFetchSize