Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id DADBD632B8C for ; Sun, 31 Jan 2010 21:05:02 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 25924-03 for ; Mon, 1 Feb 2010 01:04:52 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from ey-out-2122.google.com (ey-out-2122.google.com [74.125.78.24]) by mail.postgresql.org (Postfix) with ESMTP id 3533E632B35 for ; Sun, 31 Jan 2010 21:04:52 -0400 (AST) Received: by ey-out-2122.google.com with SMTP id 9so810546eyd.33 for ; Sun, 31 Jan 2010 17:04:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=s8AfpcEH2IMDnh/uFkWOPCEgPL4grCnh1f3UobAe/xc=; b=nl3j8wus8l48IkPm+txtl0CkyT5rrLlqFwA/Oo2ei1xA2wLJbS1mID+xHll6JB/ctK Un9mBoD4wBKLsbtu8rTcRtjVsx40hjwO9zGNdCojv4AZ7YEa6pFIvWuGfPA9wopiMz8+ YlN7uO5/eQr9e242IBnfbL7QNCMrHebs5Azb8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=T/Eto3vnSW/WRB1MFJ3rYottVkbh7KCf/7s5m89UAtXHxk4R9KNOUNqOc+F0QS+KPl pYtyJ0Gig7k5Y7l/GW3FNBl7AO1SO59iTLKoVwoskqw16LdzXtD3zBHW41Lsg/iFFR1V B0RqV82+/VEwQrRkkaUtAfJNIIs39LC9qQYrw= MIME-Version: 1.0 Received: by 10.216.153.208 with SMTP id f58mr2287735wek.36.1264986290225; Sun, 31 Jan 2010 17:04:50 -0800 (PST) In-Reply-To: <1f30b80c1001311702g3ed5e895gc6e504ffe23d7840@mail.gmail.com> References: <1f30b80c1001290049ub864091r8298fca3daa0eb69@mail.gmail.com> <1f30b80c1001311650q264dfda0uf9894cac3b9e0c3e@mail.gmail.com> <1f30b80c1001311702g3ed5e895gc6e504ffe23d7840@mail.gmail.com> Date: Sun, 31 Jan 2010 18:04:50 -0700 Message-ID: Subject: Re: Fwd: Help required on query performance From: Scott Marlowe To: dclements89@gmail.com Cc: pgsql-sql Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.599 tagged_above=-10 required=5 tests=BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 201001/59 X-Sequence-Number: 33595 On Sun, Jan 31, 2010 at 6:02 PM, Dave Clements wrote: > Hi, following the output from explain analyze. Without doing any heavy analysis, it looks like your row estimates are way off. Have you cranked up stats target and re-analyzed yet?