From: Gunnlaugur Þór Briem <gunnlaugur@gmail.com>
To: pgsql-performance@postgresql.org
Subject: Re: Constraint exclusion on UNION ALL subqueries with WHERE conditions
Date: Thu, 22 Sep 2011 02:43:25 -0700 (PDT)
Message-ID: <6377661.339.1316684605118.JavaMail.geo-discussion-forums@yqih9> (raw)
In-Reply-To: <25530.1316625060@sss.pgh.pa.us>
References: <bd6669a0-5da6-410c-b3a2-4a1c01777003@glegroupsg2000goo.googlegroups.com>
<25440.1316404770@sss.pgh.pa.us>
<12971543.2235.1316510130842.JavaMail.geo-discussion-forums@yqcd38>
<25530.1316625060@sss.pgh.pa.us>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: gunnlaugur@gmail.com
Subject: Re: Constraint exclusion on UNION ALL subqueries with WHERE conditions
In-Reply-To: <6377661.339.1316684605118.JavaMail.geo-discussion-forums@yqih9>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox