Re: [PERFORM] Constraint exclusion won't exclude parent table

2014-05-13 Thread Tim Kane
> > > Yeah, it's not expected that that's going to cost much. I am suspicious > that what you are looking at is mostly measurement overhead: during > EXPLAIN ANALYZE, each plan node has to do two gettimeofday() calls per > call, and there are lots of platforms where that is significant relative

Re: [PERFORM] Constraint exclusion won't exclude parent table

2014-05-13 Thread Tom Lane
Tim Kane writes: > So what is the append node actually doing, and why is it necessary? > I expect that it simply does what it says, and appends the results of those > two seq-scans. But in reality, there isn’t a lot to do there. While I > expect a little bit of overhead, surely it just passes t

[PERFORM] Constraint exclusion won't exclude parent table

2014-05-13 Thread Tim Kane
Hi all, First some background. I have inherited a system that appears to have a lot of logic built into views upon views upon views (and then some more views for good measure). It struck me that the CASE conditions built into those views are causing poorer performance than expected – so I thought