Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1U34sv-0007WX-PG for pgsql-performance@arkaria.postgresql.org; Wed, 06 Feb 2013 13:17:57 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1U34sv-0006oy-9j for pgsql-performance@arkaria.postgresql.org; Wed, 06 Feb 2013 13:17:57 +0000 Received: from makus.postgresql.org ([98.129.198.125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1U34su-0006ot-DV for pgsql-performance@postgresql.org; Wed, 06 Feb 2013 13:17:56 +0000 Received: from mail-vc0-f173.google.com ([209.85.220.173]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1U34ss-0007xZ-JC for pgsql-performance@postgresql.org; Wed, 06 Feb 2013 13:17:55 +0000 Received: by mail-vc0-f173.google.com with SMTP id fy7so830584vcb.18 for ; Wed, 06 Feb 2013 05:17:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:date:from:to:message-id:in-reply-to:references:subject :x-mailer:mime-version:content-type; bh=DMhcG22Vo+X12NxOM7ASG+yFFc6+kz6PTgt+s1reCjk=; b=WcrGjpzwWfEOFhfHP7CSWC3V1ydkp87Nru1fiGNUfD0au4ZHMURqAKpar/22+iZP7a fCgPN/JrXahINTQtsO2ZwASNedyVWAAb8nYBaeOCNb6GRSzwq6O4ygVrOAt88U+bN2Q5 PBds4DY2Ob+dt4d5W7UgBa3Rx5QOur3FmyhSSKbraeleMZ4j+WyKUmfSPlyqPuFSW1VV hH/I83RyoNCT7ULmyUED7h9tjXAUcqiqaVk4qMaOH0icaRCoEMKnOMYzVf+jLWVrSizx mupcDTyVCpEupJ4SRyXR7q+txzpceV4IoCYiRMIcX/A4iYXlY9/fZmNPS3vazYEHbnaA /MXg== X-Received: by 10.52.180.200 with SMTP id dq8mr28420516vdc.71.1360156673655; Wed, 06 Feb 2013 05:17:53 -0800 (PST) Received: from [192.168.150.104] (cpe-142-105-213-24.stny.res.rr.com. [142.105.213.24]) by mx.google.com with ESMTPS id h11sm31010959vdj.12.2013.02.06.05.17.52 (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 06 Feb 2013 05:17:52 -0800 (PST) Date: Wed, 6 Feb 2013 08:17:50 -0500 From: Will Platnick To: pgsql-performance@postgresql.org Message-ID: <2CB5B53971DB42238A7640E6EFAE8D19@gmail.com> In-Reply-To: References: Subject: Re: Slow Query Help X-Mailer: sparrow 1.6.4 (build 1178) MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="511257fe_7c83e458_1c95" X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-performance Precedence: bulk Sender: pgsql-performance-owner@postgresql.org --511257fe_7c83e458_1c95 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline 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 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 during peak activity and my pg_stat_activity and > > slow log sampling agrees. We have 3 DB servers referenced here, production > > running 9.2.2, semi-idle (idle except for replication when I ran the test) > > running 9.2.2, and 9.1.3 completely idle with an old dump restored. > > > > > 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 though. It could be ExecutorStart/End, but have no idea why they > should take so long. > > Thanks, > Pavan > -- > Pavan Deolasee > http://www.linkedin.com/in/pavandeolasee > > --511257fe_7c83e458_1c95 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline
Good eye, I totally missed that=21

Any ideas on how to troubleshoo= t this delay=3F


=20

On Wednesday, =46ebrua= ry 6, 2013 at 3:51 AM, Pavan Deolasee wrote:

On Tue, =46eb 5, 2013 at 9:15 AM= , Will Platnick <wplatnic= k=40gmail.com> wrote:
We upgraded from PG 9.1 to 9.2. Since the upgrade, the =23 of active que= ries
has raised significantly, especially during our peak time = where lots of
users are logging in. According to New Relic, th= is query is now taking up
the most amount of time during peak a= ctivity and my pg=5Fstat=5Factivity and
slow log sampling agree= s. We have 3 DB servers referenced here, production
running 9.2= .2, semi-idle (idle except for replication when I ran the test)
running 9.2.2, and 9.1.3 completely idle with an old dump restored.

The only thing that stands out is= : on your production server I see
=22Total runtime: 7.515 ms=22= , but the top node in EXPLAIN ANAYZE shows
actual time as 0.179= ms. Not sure where that additional time is being
spent though.= It could be ExecutorStart/End, but have no idea why they
shoul= d take so long.

Thanks,
Pavan
--
Pavan Deolasee
=20 =20 =20 =20 =20

--511257fe_7c83e458_1c95--