Re: Constraint exclusion on UNION ALL subqueries with WHERE conditions

From: Gunnlaugur Þór Briem <gunnlaugur(at)gmail(dot)com>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: Constraint exclusion on UNION ALL subqueries with WHERE conditions
Date: 2011-09-22 09:43:25
Message-ID: 6377661.339.1316684605118.JavaMail.geo-discussion-forums@yqih9
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-performance

Right, the view that prompted this involved subqueries; the function was just an artificial test case.

That change seems like a good one for sure.

Ideally I'd like to enable it for a particular view rather than incur the planning expense for the whole DB (something like ALTER VIEW foo WITH CONSTRAINT EXCLUSION), but I guess there's no support currently (and not easily added) for such per-object planner settings? The application can just issue SET constraint_exclusion=on; as needed; for my case that's fine, but for DBAs maybe a bit limiting.

Regards,

- Gulli

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2011-09-22 10:05:33 Re: WIP: SP-GiST, Space-Partitioned GiST
Previous Message Thom Brown 2011-09-22 08:36:50 Re: Unlogged vs. In-Memory

Browse pgsql-performance by date

  From Date Subject
Next Message ktm@rice.edu 2011-09-22 13:41:25 Re: Query optimization using order by and limit
Previous Message Tom Lane 2011-09-22 03:22:53 Re: Query optimization using order by and limit