Re: [PERFORM] Slow query help

2016-01-07 Thread Marc Mamin
>I ask your help to solve a slow query which is taking more than 14 seconds to >be executed. >Maybe I am asking too much both from you and specially from postgresql, as it >is really huge, envolving 16 tables. > >Explain: >http://explain.depesz.com/s/XII9 > >Schema:

[PERFORM] Slow query help

2016-01-06 Thread Almir de Oliveira Duarte Junior
Hi, I ask your help to solve a slow query which is taking more than 14 seconds to be executed. Maybe I am asking too much both from you and specially from postgresql, as it is really huge, envolving 16 tables. Explain: http://explain.depesz.com/s/XII9 Schema:

Re: [PERFORM] Slow Query Help

2013-02-06 Thread Pavan Deolasee
On Tue, Feb 5, 2013 at 9:15 AM, Will Platnick wplatn...@gmail.com wrote: We upgraded from PG 9.1 to 9.2. Since the upgrade, the # of active queries has raised significantly, especially during our peak time where lots of users are logging in. According to New Relic, this query is now taking up

Re: [PERFORM] Slow Query Help

2013-02-06 Thread Will Platnick
Good eye, I totally missed that! Any ideas on how to troubleshoot this delay? On Wednesday, February 6, 2013 at 3:51 AM, Pavan Deolasee wrote: On Tue, Feb 5, 2013 at 9:15 AM, Will Platnick wplatn...@gmail.com (mailto:wplatn...@gmail.com) wrote: We upgraded from PG 9.1 to 9.2. Since the

Re: [PERFORM] Slow Query Help

2013-02-06 Thread Kevin Grittner
Will Platnick wplatn...@gmail.com wrote: Will Platnick wplatn...@gmail.com wrote: The only thing that stands out is: on your production server I see Total runtime: 7.515 ms, but the top node in EXPLAIN ANAYZE shows actual time as 0.179 ms. Not sure where that additional time is being spent

Re: [PERFORM] Slow Query Help

2013-02-06 Thread Will Platnick
Clients are technically our pgbouncer which is on the same machine. The explain analyze was local through psql direct to postgresql. On Wednesday, February 6, 2013 at 11:22 AM, Kevin Grittner wrote: Will Platnick wplatn...@gmail.com (mailto:wplatn...@gmail.com) wrote: Will Platnick

Re: [PERFORM] Slow Query Help

2013-02-06 Thread Pavan Deolasee
On Wed, Feb 6, 2013 at 9:52 PM, Kevin Grittner kgri...@ymail.com wrote: Will Platnick wplatn...@gmail.com wrote: Will Platnick wplatn...@gmail.com wrote: The only thing that stands out is: on your production server I see Total runtime: 7.515 ms, but the top node in EXPLAIN ANAYZE shows

Re: [PERFORM] Slow Query Help

2013-02-05 Thread Heikki Linnakangas
On 05.02.2013 05:45, Will Platnick wrote: We upgraded from PG 9.1 to 9.2. Since the upgrade, the # of active queries has raised significantly, especially during our peak time where lots of users are logging in. According to New Relic, this query is now taking up the most amount of time

[PERFORM] Slow Query Help

2013-02-04 Thread Will Platnick
We upgraded from PG 9.1 to 9.2. Since the upgrade, the # of active queries has raised significantly, especially during our peak time where lots of users are logging in. According to New Relic, this query is now taking up the most amount of time during peak activity and my pg_stat_activity and