Re: Possible planner bug?

From: Jeff Davis <pgsql(at)j-davis(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Possible planner bug?
Date: 2007-03-20 21:20:56
Message-ID: 1174425656.23455.528.camel@dogma.v10.wvs
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, 2007-03-19 at 14:31 -0400, Tom Lane wrote:
> Jeff Davis <pgsql(at)j-davis(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Andrej Ricnik-Bay 2007-03-20 21:28:27 Re: Postgresql to Delphi
Previous Message Tony Caduto 2007-03-20 21:16:14 Re: Postgresql to Delphi