Re: C++, Postgres , libpqxx huge query

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: C++, Postgres , libpqxx huge query
Дата
Msg-id 20140504102447.GL12715@awork2.anarazel.de
обсуждение исходный текст
Ответ на C++, Postgres , libpqxx huge query  (alexandros_e <alexandros.ef@gmail.com>)
Ответы Re: C++, Postgres , libpqxx huge query
Список pgsql-general
Hi,

On 2014-05-04 01:57:43 -0700, alexandros_e wrote:
> I have to execute an SQL query to Postgres by the following code. The query
> returns a huge number of rows (40M or more) and has 4 integer fields: When I
> use a workstation with 32Gb everything works but on a 16Gb workstation the
> query is very slow (due to swapping I guess). Is there any way to tell the
> C++ to load rows at batches, without waiting the entire dataset? With Java I
> never had these issues before, due to the probably better JDBC driver.

Try looking into either using a serverside cursor or COPY.

Greetings,

Andres Freund

--
 Andres Freund                       http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services


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

Предыдущее
От: Alban Hertroys
Дата:
Сообщение: Re: C++, Postgres , libpqxx huge query
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: Server continuously enters to recovery mode.