Re: same plan, add 1 condition, 1900x slower

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Richard Huxton <dev(at)archonet(dot)com>
Cc: Mitch Skinner <mitch(at)egcrc(dot)net>, pgsql-performance(at)postgresql(dot)org
Subject: Re: same plan, add 1 condition, 1900x slower
Date: 2005-11-11 14:17:04
Message-ID: 18120.1131718624@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Richard Huxton <dev(at)archonet(dot)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

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Mitch Skinner 2005-11-11 14:20:43 Re: same plan, add 1 condition, 1900x slower
Previous Message Tom Lane 2005-11-11 14:09:36 Re: same plan, add 1 condition, 1900x slower