Re: Sorting performance vs. MySQL - Mailing list pgsql-general

From Greg Stark
Subject Re: Sorting performance vs. MySQL
Date
Msg-id 407d949e1002230102u1a374386h7aa5502839b965f@mail.gmail.com
Whole thread Raw
In response to Re: Sorting performance vs. MySQL  (Scott Marlowe <scott.marlowe@gmail.com>)
Responses Re: Sorting performance vs. MySQL
List pgsql-general
On Tue, Feb 23, 2010 at 6:48 AM, Scott Marlowe <scott.marlowe@gmail.com> wrote:
>> I'm relieved that Postgresql itself does not, in fact, suck, but
>> slightly disappointed in the behavior of psql. I suppose it needs to
>> buffer everything in memory to properly format its tabular output,
>> among other possible reasons I could imagine.
>
> It's best when working with big sets to do so with a cursor and fetch
> a few thousand rows at a time.  It's how we handle really big sets at
> work and it works like a charm in keeping the client from bogging down
> with a huge memory footprint.
>

You can do \set FETCH_COUNT to have psql use a cursor automatically.


--
greg

pgsql-general by date:

Previous
From: "Albe Laurenz"
Date:
Subject: Explaining duplicate rows in spite of unique index
Next
From: John R Pierce
Date:
Subject: Re: typecaste object to array