Re: [PERFORM] CPU spikes and transactions

2014-05-13 Thread Dave Owens
Hi, Apologies for resurrecting this old thread, but it seems like this is better than starting a new conversation. We are now running 9.1.13 and have doubled the CPU and memory. So 2x 16 Opteron 6276 (32 cores total), and 64GB memory. shared_buffers set to 20G, effective_cache_size set to 40GB.

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] Adaptive query execution

2014-05-13 Thread Tim Kane
> > > From: Claudio Freire >> I thought I would see what happens when I do this: >> >>SELECT * FROM ONLY table_a UNION SELECT * FROM table_b; >> >> >> > What's the point, in the context of this example? > > The sort-unique still has to be performed even if you didn't have data > in on

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

Re: [PERFORM] Adaptive query execution

2014-05-13 Thread Claudio Freire
On Tue, May 13, 2014 at 5:08 PM, Tim Kane wrote: > Hi all, > > So I was thinking about the following, after experimenting with constraint > exclusion. > > I thought I would see what happens when I do this: > > SELECT * FROM ONLY table_a UNION SELECT * FROM table_b; > > > I noticed that despite t

[PERFORM] Adaptive query execution

2014-05-13 Thread Tim Kane
Hi all, So I was thinking about the following, after experimenting with constraint exclusion. I thought I would see what happens when I do this: SELECT * FROM ONLY table_a UNION SELECT * FROM table_b; I noticed that despite table_a still having no data in it, the planner has already decided

[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

Re: [PERFORM] Specifications for a new server

2014-05-13 Thread Jeff Janes
On Thu, May 8, 2014 at 1:11 AM, Johann Spies wrote: > > >> >> So my questions: >>> >>> 1. Will the SSD's in this case be worth the cost? >>> 2. What will the best way to utilize them in the system? >>> >> >> The best way to utilize them would probably be to spend less on the CPU >> and RAM and

Re: [PERFORM] Specifications for a new server

2014-05-13 Thread Michael Stone
On Thu, May 08, 2014 at 10:11:38AM +0200, Johann Spies wrote: I understand your remark about the CPU in the light of my wrong assumption earlier, but I do not understand your remark about the RAM.  The fact that temporary files of up to 250Gb are created at times during complex queries, is to me