Re: Possible planner bug? - Mailing list pgsql-general

From Jeff Davis
Subject Re: Possible planner bug?
Date
Msg-id 1174425656.23455.528.camel@dogma.v10.wvs
Whole thread Raw
In response to Re: Possible planner bug?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
On Mon, 2007-03-19 at 14:31 -0400, Tom Lane wrote:
> Jeff Davis <pgsql@j-davis.com> writes:
> > I have two indexes defined on "syslog_p":
>
> > "syslog_p_severity_ts_idx" btree (severity, ts)
> > "syslog_p_ts_where_severity_1_idx" btree (ts) WHERE severity = 1
>
> > The planner chooses what looks to me like a very strange plan for this
> > query:
> > => explain analyze select * from syslog where severity=1;
>
> The attached crude hack makes it not do that, but I wonder whether it
> won't prevent use of bitmap AND in some cases where we'd rather it did
> use an AND.  Want to try it out?
>

The patch you provided appears to work perfectly. Thanks!

Regards,
    Jeff Davis


pgsql-general by date:

Previous
From: Tony Caduto
Date:
Subject: Re: Postgresql to Delphi
Next
From: "Andrej Ricnik-Bay"
Date:
Subject: Re: Postgresql to Delphi