X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 6D09BD1DACD for ; Tue, 9 Mar 2004 05:35:32 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 22367-03 for ; Tue, 9 Mar 2004 01:35:22 -0400 (AST) Received: from localhost.localdomain (unknown [200.245.23.5]) by svr1.postgresql.org (Postfix) with ESMTP id 42089D1D803 for ; Tue, 9 Mar 2004 01:34:25 -0400 (AST) Received: from yahoo.com.br (localhost.localdomain [127.0.0.1]) by localhost.localdomain (8.12.8/8.12.8) with ESMTP id i295hu3C003014; Tue, 9 Mar 2004 02:43:59 -0300 Message-ID: <404D599C.80101@yahoo.com.br> Date: Tue, 09 Mar 2004 02:43:56 -0300 From: Daniel Henrique Alves Lima Reply-To: email_daniel_h@yahoo.com.br User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Iain Cc: pgsql-sql@postgresql.org Subject: Re: Simple SQL question References: <404C7EE3.8010006@yahoo.com.br> <20040308184440.GG588@64.81.242.180> <404D4667.10206@yahoo.com.br> <00cd01c40597$58d3e9a0$7201a8c0@mst1x5r347kymb> In-Reply-To: <00cd01c40597$58d3e9a0$7201a8c0@mst1x5r347kymb> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200403/72 X-Sequence-Number: 17171 Ok, Iain. Thanks for the tip ! Iain wrote: >Just a note based on my experience, if you are going to to use IN processing >then there is a good chance that the index isn't going to be used. In some >recent tests I did, the index stopped being used after I put 3 or more items >in the IN list. You should build some representatve examples of the select >and test them using "ANALYSE SELECT ..." .I'm using 7.4.1. > >The result from the select is the same, even if you don't make an index on >the function result.It's just a performance consideration. If the index >isn't used, then you don't need to create it. > >regards >Iain >----- Original Message ----- >From: "Daniel Henrique Alves Lima" >To: >Sent: Tuesday, March 09, 2004 1:21 PM >Subject: Re: [SQL] Simple SQL question > > > >