From: Tom Lane <tgl@sss.pgh.pa.us>
To: Richard Huxton <dev@archonet.com>
Cc: Mitch Skinner <mitch@egcrc.net>
Cc: pgsql-performance@postgresql.org
Subject: Re: same plan, add 1 condition, 1900x slower
Date: Fri, 11 Nov 2005 09:17:04 -0500
Message-ID: <18120.1131718624@sss.pgh.pa.us> (raw)
In-Reply-To: <437485DB.50005@archonet.com>
References: <1131630176.29496.91.camel@enzian>
<10164.1131643400@sss.pgh.pa.us>
<1131700635.29496.136.camel@enzian>
<437485DB.50005@archonet.com>
Richard Huxton <dev@archonet.com> writes:
> Mitch Skinner wrote:
>> The version with the condition is definitely doing more I/O. The
>> version without the condition doesn't read at all.
> Does external_id_map really have 15 million rows? If not, try a VACUUM
> FULL on it. Be prepared to give it some time to complete.
Please don't, actually, until we understand what's going on.
The thing is that the given plan will fetch every row indicated by the
index in both cases, in order to check the row's visibility. I don't
see how an additional test on a non-indexed column would cause any
additional I/O. If the value were large enough to be toasted
out-of-line then it could cause toast table accesses ... but we're
speaking of a char(3).
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, dev@archonet.com, mitch@egcrc.net
Subject: Re: same plan, add 1 condition, 1900x slower
In-Reply-To: <18120.1131718624@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