Re: *** PROBABLY SPAM *** Does the psql executable support a "fetch many" approach when dumping large queries to stdout?

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Pierre C <lists(at)peufeu(dot)com>
Cc: "Beaver, John E" <John_Beaver(at)hms(dot)harvard(dot)edu>, "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: *** PROBABLY SPAM *** Does the psql executable support a "fetch many" approach when dumping large queries to stdout?
Date: 2010-04-13 02:49:29
Message-ID: 201004130249.o3D2nUd02232@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Pierre C wrote:
> > Does the psql executable have any ability to do a "fetch many", using a
> > server-side named cursor, when returning results? It seems like it tries
> > to retrieve the query entirely to local memory before printing to
> > standard out.
>
> I think it grabs the whole result set to calculate the display column
> widths. I think there is an option to tweak this but don't remember which,
> have a look at the psql commands (\?), formatting section.

See the FETCH_COUNT variable mentioned in the psql manual page.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message norn 2010-04-13 06:07:19 Re: significant slow down with various LIMIT
Previous Message Kevin Grittner 2010-04-12 21:39:48 Re: How to diagnose a *context-switching * storm problem ?