Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id C34BC642D43 for ; Thu, 10 Jun 2010 17:21:56 -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 91749-01 for ; Thu, 10 Jun 2010 20:21:49 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sp-exchfea.sp.corp.collab.net (sp-exchfea.sp.corp.collab.net [204.16.106.198]) by mail.postgresql.org (Postfix) with ESMTP id 1A2B7642D12 for ; Thu, 10 Jun 2010 17:21:48 -0300 (ADT) Received: from [204.11.125.143] ([204.11.125.143]) by sp-exchfea.sp.corp.collab.net with Microsoft SMTPSVC(6.0.3790.3959); Thu, 10 Jun 2010 13:21:47 -0700 Message-ID: <4C114958.4080308@collab.net> Date: Thu, 10 Jun 2010 13:21:44 -0700 From: Anne Rosset User-Agent: Thunderbird 2.0.0.24 (Windows/20100228) MIME-Version: 1.0 To: Joe Conway CC: Craig James , pgsql-performance@postgresql.org Subject: Re: Need to increase performance of a query References: <4C1125F0.8090101@collab.net> <4C112B19.6080908@krogh.cc> <4C113098.5040105@collab.net> <98414706.20100610212211@erwied.eu> <4C113E2F.6000305@collab.net> <4C11413B.8080107@emolecules.com> <4C114381.3030900@collab.net> <4C11469A.8000706@joeconway.com> <4C11477A.5020909@joeconway.com> In-Reply-To: <4C11477A.5020909@joeconway.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 10 Jun 2010 20:21:47.0246 (UTC) FILETIME=[8D0C08E0:01CB08DA] X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.51 tagged_above=-10 required=5 tests=BAYES_05=-0.5, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201006/189 X-Sequence-Number: 39045 Joe Conway wrote: > On 06/10/2010 01:10 PM, Joe Conway wrote: > >> try: >> >> create index item_rank_null_idx on item_rank(pf_id) >> where rank IS NOT NULL AND pf_id IS NULL; >> > > oops -- that probably should be: > > create index item_rank_null_idx on item_rank(project_id) > where rank IS NOT NULL AND pf_id IS NULL; > > Joe > > I tried that and it didn't make any difference. Same query plan. Anne