From: Tom Lane <tgl@sss.pgh.pa.us>
To: sthomas@peak6.com
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Giovanni Mancuso <gmancuso@babel.it>
Cc: pgsql-performance@postgresql.org
Subject: Re: Performance problem with a table with 38928077 record
Date: Thu, 27 Oct 2011 18:19:46 -0400
Message-ID: <7239.1319753986@sss.pgh.pa.us> (raw)
In-Reply-To: <4EA9BF84.3000203@peak6.com>
References: <4E8ECEB7.4080800@babel.it>
<CA+TgmoanXurA=ZFqkNtx-GA5MsPX7mSKw007uA_DO4RRQwoyGg@mail.gmail.com>
<4EA9BF84.3000203@peak6.com>
Shaun Thomas <sthomas@peak6.com> writes:
> On 10/27/2011 02:13 PM, Robert Haas wrote:
>> If I had to guess, I'd bet that the second one is trying to spool the
>> resultset in memory someplace and that's driving the machine into
>> swap.
> That would be my guess too. SELECT * on a 40-million row table is a
> *lot* different than getting the count, which throws away the rows once
> it verifies they're valid.
But EXPLAIN ANALYZE throws away the rows too. There's something odd
going on there, but the information provided is insufficient to tell
what.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: tgl@sss.pgh.pa.us, sthomas@peak6.com, robertmhaas@gmail.com, gmancuso@babel.it
Subject: Re: Performance problem with a table with 38928077 record
In-Reply-To: <7239.1319753986@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox