Re: Question about explain of index scan

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Hannu Krosing <hannu(at)skype(dot)net>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Question about explain of index scan
Date: 2005-09-02 15:31:49
Message-ID: 14586.1125675109@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hannu Krosing <hannu(at)skype(dot)net> writes:
> On R, 2005-09-02 at 10:31 -0400, Tom Lane wrote:
>> Yes. However, I don't understand how you got that result; AFAIK the
>> planner should have eliminated the duplicate subclauses.

> the query was similar to this:
> [snip]

Oh, the OR arms are actually *not* equivalent because of the log_tableid
subclauses. So that explains why canonicalize_qual() didn't eliminate
them.

[ experiments... ] It looks like 8.0 and up are smart enough to
consolidate the identical extracted indexquals, but not 7.4.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2005-09-02 15:38:10 Re: Question about explain of index scan
Previous Message Stephen Frost 2005-09-02 15:23:43 Re: GRANT/roles problem: grant is shown as from login role