Re: Migration study, step 2: rewriting queries - Mailing list pgsql-performance

From Tom Lane
Subject Re: Migration study, step 2: rewriting queries
Date
Msg-id 20147.1145237750@sss.pgh.pa.us
Whole thread Raw
In response to Migration study, step 2: rewriting queries  ("Mikael Carneholm" <Mikael.Carneholm@WirelessCar.com>)
List pgsql-performance
"Mikael Carneholm" <Mikael.Carneholm@WirelessCar.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

pgsql-performance by date:

Previous
From: "Mikael Carneholm"
Date:
Subject: Migration study, step 2: rewriting queries
Next
From: Cris Carampa
Date:
Subject: index is not used if I include a function that returns current time in my query