Re: [PERFORM] Sudden crazy high CPU usage

2014-04-01 Thread Niels Kristian Schjødt
Sorry, but nothing unusual here either, I have compared the time just before with the same time the days before and the throughput pattern is exactly the same. No differences. Den 31/03/2014 kl. 22.01 skrev Will Platnick wplatn...@gmail.com: In New Relic, go back a half hour before the

Re: [PERFORM] Sudden crazy high CPU usage

2014-04-01 Thread Andres Freund
On 2014-03-31 19:16:58 +0200, Niels Kristian Schjødt wrote: Yes, I could install “perf”, though I’m not familiar with it. What would i do? :-) As root: perf record -a sleep 5 perf report my-nice-perf-report.txt And then send the my-nice-perf-report.txt file. Locally it's much nicer to see

Re: [PERFORM] Slow Count-Distinct Query

2014-04-01 Thread bricklen
On Sun, Mar 30, 2014 at 12:45 PM, Christopher Jackson crjac...@gmail.comwrote: Hi all, tl;dr - How can I speed up my count-distinct query? Depending on how often you need to run that query and how important it is to you, if you are willing to accept a performance hit on

Re: [PERFORM] Slow Count-Distinct Query

2014-04-01 Thread Christopher Jackson
Hi Bricklen, Thanks for the feedback. I'll play around with materialized views. My understanding is they have to be manually triggered for refresh and there's an exclusive lock on the view while the refresh is taking place. Is this your understanding as well? I'm using PG 9.3.3. If

Re: [PERFORM] Slow Count-Distinct Query

2014-04-01 Thread Michael Paquier
On Wed, Apr 2, 2014 at 1:22 PM, Christopher Jackson crjac...@gmail.com wrote: Hi Bricklen, Thanks for the feedback. I'll play around with materialized views. My understanding is they have to be manually triggered for refresh Yep. and there's an exclusive lock on the view while the

Re: [PERFORM] Slow Count-Distinct Query

2014-04-01 Thread Christopher Jackson
Hi Bricklen, Thanks again for the feedback. The concurrent refresh sounds cool. I just saw the 9.4 release is tentatively scheduled for later this year. Do you know what people have been doing for view refreshes in the meantime? Thanks On Tue, Apr 1, 2014 at 11:48 PM, Michael