Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 90A47632B8C for ; Sun, 31 Jan 2010 21:09:43 -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 26513-01 for ; Mon, 1 Feb 2010 01:09:32 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-px0-f194.google.com (mail-px0-f194.google.com [209.85.216.194]) by mail.postgresql.org (Postfix) with ESMTP id D5510632B35 for ; Sun, 31 Jan 2010 21:09:32 -0400 (AST) Received: by pxi32 with SMTP id 32so3345104pxi.15 for ; Sun, 31 Jan 2010 17:09:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:reply-to:received :in-reply-to:references:from:date:x-google-sender-auth:message-id :subject:to:cc:content-type:content-transfer-encoding; bh=vEjhi5P/w5a8j46DUohwoZyvNmdldZyzYRXRk50NIHU=; b=Zz7FVbc4ETCAPqwabNxy6vXTKToninPGXGT56XSja2UAsnl0jVB2HTmiDCh/SPllvh tfG0as7OK+Ea0J8NkojUpegRLHzEeVhVstqUHrVGB9jhtlWbNK6ewIILmdov+mhvcx+s dQlOkE3xxx/ENjUZrlAQdgOmGeDFBU/Mjw22I= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:reply-to:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding; b=XJEjD+mK2uccicBZfeR4BRLPJYXpp1yoiABOp7pyq+/6M7sAvJ9wx4QPpfIBdsgoLc TjRtbcutVECSk7ofAAj0kFL5R40VOLuHHznS0s2wPx6Om1uHbLesmKs2Mx44DN1XsKtf Cp0lTcjk2Om2T8u0kCMbVxenYo21crwz6GBNw= MIME-Version: 1.0 Reply-To: dclements89@gmail.com Received: by 10.114.163.3 with SMTP id l3mr2604727wae.151.1264986571069; Sun, 31 Jan 2010 17:09:31 -0800 (PST) In-Reply-To: References: <1f30b80c1001290049ub864091r8298fca3daa0eb69@mail.gmail.com> <1f30b80c1001311650q264dfda0uf9894cac3b9e0c3e@mail.gmail.com> <1f30b80c1001311702g3ed5e895gc6e504ffe23d7840@mail.gmail.com> From: Dave Clements Date: Mon, 1 Feb 2010 12:09:11 +1100 X-Google-Sender-Auth: c318b2c1fd491f0f Message-ID: <1f30b80c1001311709u14758b64u162aad3ace527600@mail.gmail.com> Subject: Re: Fwd: Help required on query performance To: Scott Marlowe Cc: pgsql-sql Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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/60 X-Sequence-Number: 33596 I did the re-analyze serveral times, using the command: ANALYZE tablename; Is there any other command as well or another way to do that? On Mon, Feb 1, 2010 at 12:04 PM, Scott Marlowe wr= ote: > On Sun, Jan 31, 2010 at 6:02 PM, Dave Clements wr= ote: >> Hi, following the output from explain analyze. > > Without doing any heavy analysis, it looks like your row estimates are > way off. =A0Have you cranked up stats target and re-analyzed yet? >