Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 43F3A632F17 for ; Fri, 27 Aug 2010 14:31:02 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 30357-03 for ; Fri, 27 Aug 2010 17:30:54 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.17.10]) by mail.postgresql.org (Postfix) with ESMTP id A55AD632A48 for ; Fri, 27 Aug 2010 14:30:54 -0300 (ADT) Received: from [192.168.1.6] (static-71-179-240-8.bltmmd.fios.verizon.net [71.179.240.8]) by mrelayeu.kundenserver.de (node=mrbap1) with ESMTP (Nemesis) id 0LbxSO-1PEANr3UU0-00jSMr; Fri, 27 Aug 2010 19:30:52 +0200 Message-ID: <4C77F64A.8030102@2ndquadrant.com> Date: Fri, 27 Aug 2010 13:30:50 -0400 From: Greg Smith User-Agent: Thunderbird 2.0.0.24 (X11/20100317) MIME-Version: 1.0 To: "Ozer, Pam" CC: pgsql-performance@postgresql.org Subject: Re: Slow Query References: In-Reply-To: Content-Type: multipart/alternative; boundary="------------050401030505080804090208" X-Provags-ID: V02:K0:2FVSP3dArTvotvEt5pZfYNYwuCgTKLp3EU8LZrZfD5B bbu+kG+MXzxi9omQyBGMzJfLisURPCsDAwlDWrDmB/oWhTgNet F/ZeFD5zDPu7bxatkAc9z61YcMZ0YENgw5VM3jG9eHm/Eu3ect nyo6PZ2ErhJ18f6+kBHD3qlAurp2Sh2HI8FA6x0RU02gUJF87p gIRH6E3WWVRGw1m5DfvJe8tuzINKulyvBKKWRMEuVE= X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.899 tagged_above=-10 required=5 tests=BAYES_00=-1.9, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001 X-Spam-Level: X-Archive-Number: 201008/297 X-Sequence-Number: 40140 This is a multi-part message in MIME format. --------------050401030505080804090208 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Ozer, Pam wrote: > > I am new to Postgres and I am trying to understand the Explain Analyze > so I can tune the following query. > You should try http://explain.depesz.com/ , where you can post query plans like this and see where the time is going in a very easy to work with form. It will highlight row estimation mistakes for you too. -- Greg Smith 2ndQuadrant US Baltimore, MD PostgreSQL Training, Services and Support greg@2ndQuadrant.com www.2ndQuadrant.us --------------050401030505080804090208 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Ozer, Pam wrote:

I am new to Postgres and I am trying to understand the Explain Analyze so I can tune the following query.


You should try http://explain.depesz.com/ , where you can post query plans like this and see where the time is going in a very easy to work with form.  It will highlight row estimation mistakes for you too.

-- 
Greg Smith  2ndQuadrant US  Baltimore, MD
PostgreSQL Training, Services and Support
greg@2ndQuadrant.com   www.2ndQuadrant.us
--------------050401030505080804090208--