Justin Pryzby <pry...@telsasoft.com> writes: > I've reduced the failing query as much as possible to this: > -- This is necessary to fail: > SET enable_nestloop=off;
> SELECT * FROM > (SELECT start_time, t1.site_id > FROM pgw_kpi_view t1 > -- Apparently the where clause is necessary to fail... > WHERE (start_time>='2019-10-10' AND start_time<'2019-10-11') > -- The group by MAY be necessary to fail... > GROUP BY 1,2 > ) AS data > JOIN sites ON ( sites.site_location='' OR sites.site_office=data.site_id) > The view is actually a join of two relkind=p partitioned tables (which I > will acknowledge probably performs poorly). Could you provide a self-contained test case please? regards, tom lane