From: Shaun Thomas <sthomas@peak6.com>
To: 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 15:31:00 -0500
Message-ID: <4EA9BF84.3000203@peak6.com> (raw)
In-Reply-To: <CA+TgmoanXurA=ZFqkNtx-GA5MsPX7mSKw007uA_DO4RRQwoyGg@mail.gmail.com>
References: <4E8ECEB7.4080800@babel.it>
<CA+TgmoanXurA=ZFqkNtx-GA5MsPX7mSKw007uA_DO4RRQwoyGg@mail.gmail.com>
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.
--
Shaun Thomas
OptionsHouse | 141 W. Jackson Blvd. | Suite 800 | Chicago IL, 60604
312-676-8870
sthomas@peak6.com
______________________________________________
See http://www.peak6.com/email-disclaimer/ for terms and conditions related to this email
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: sthomas@peak6.com, robertmhaas@gmail.com, gmancuso@babel.it
Subject: Re: Performance problem with a table with 38928077 record
In-Reply-To: <4EA9BF84.3000203@peak6.com>
* 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