Re: Do we still need constraint_exclusion? - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: Do we still need constraint_exclusion?
Date
Msg-id 200901072224.n07MOAT29470@momjian.us
Whole thread Raw
In response to Re: Do we still need constraint_exclusion?  (Stephen Frost <sfrost@snowman.net>)
Responses Re: Do we still need constraint_exclusion?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Stephen Frost wrote:
-- Start of PGP signed section.
> Simon,
> 
> * Simon Riggs (simon@2ndQuadrant.com) wrote:
> > I don't really understand this. Who can set up an inherited table
> > structure but can't remember to turn on constraint_exclusion? That is
> > the easiest part of the whole process by a long way. Nobody has this
> > table design by accident, they've all been told how or read the docs.
> 
> I can, very easily.  It happens whenever we stand up a new server, dump
> our tables into it, create our UNION ALL views, and then try to query
> them.  Sure, we've gotten used to "oh, we need to go check and make sure
> constraint_exclusion is on", but it can be annoying, and if we're ever
> handing off our table structures/setups to other people we have to
> remember to tell them "oh, and don't forget to enable
> constraint_exclusion!", etc, etc..

This new change also adds the constraint exclusion overhead only for
inhertance (by default) so it should slightly improve query peformance.

--  Bruce Momjian  <bruce@momjian.us>        http://momjian.us EnterpriseDB
http://enterprisedb.com
 + If your life is a hard drive, Christ can be your backup. +


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Proposal: new border setting in psql
Next
From: Greg Smith
Date:
Subject: Re: Do we still need constraint_exclusion?