Re: Migration study, step 2: rewriting queries

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Mikael Carneholm" <Mikael(dot)Carneholm(at)WirelessCar(dot)com>
Cc: "Pgsql performance" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Migration study, step 2: rewriting queries
Date: 2006-04-17 01:35:50
Message-ID: 20147.1145237750@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

"Mikael Carneholm" <Mikael(dot)Carneholm(at)WirelessCar(dot)com> writes:
> ..and this last AND seems unnessecary, since the predicate on
> (driver_activity_type__id = 5) is included in each of the above
> conditions.

This should be fixed by the changes I made recently in choose_bitmap_and
--- it wasn't being aggressive about pruning overlapping AND conditions
when a sub-OR was involved. It's possible the new coding is *too*
aggressive, and will reject indexes that it'd be profitable to include;
but at least it won't make this particular mistake.

regards, tom lane

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Sriram Dandapani 2006-04-17 14:34:38 slow cursor
Previous Message Mikael Carneholm 2006-04-16 23:24:20 Migration study, step 2: rewriting queries