Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 1B59B2E010F for ; Thu, 13 Mar 2008 04:34:21 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 81399-02 for ; Thu, 13 Mar 2008 04:34:15 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.174]) by postgresql.org (Postfix) with ESMTP id 3B16D2E00A1 for ; Thu, 13 Mar 2008 04:34:14 -0300 (ADT) Received: from webserv.wug.de ([194.25.154.138]) by mrelayeu.kundenserver.de (node=mrelayeu4) with ESMTP (Nemesis) id 0ML21M-1JZhwx0dQB-00023U; Thu, 13 Mar 2008 08:34:11 +0100 Received: from kretschmer by webserv.wug.de with local (Exim 3.36 #1) id 1JZhwg-0006an-00 for pgsql-performance@postgresql.org; Thu, 13 Mar 2008 08:33:46 +0100 Date: Thu, 13 Mar 2008 08:33:46 +0100 From: "A. Kretschmer" To: pgsql-performance@postgresql.org Subject: Re: partial index + select query performance Message-ID: <20080313073346.GC22306@a-kretschmer.de> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-OS: Debian/GNU Linux - weil ich es mir Wert bin! User-Agent: Mutt/1.5.9i X-Provags-ID: V01U2FsdGVkX197nBprC9hwcGXxv7bEJtFiueB2UBudbqMA94j 0U30/42wyVpFrEnHHE6y2LEYZN2Gtq9ZNpqn9B9OrV85zS1MqF /yv80NKNCzQVojyUhjpDSPYmt8u64dO X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200803/271 X-Sequence-Number: 29225 am Thu, dem 13.03.2008, um 12:51:54 +0530 mailte petchimuthu lingam folgendes: > > I have created partial index on a field with conditions, if field _a > 200 > and field_a < 300. > > I using the select query with condition as field_a in ( 100, 250, 289, ), > > Will it use the index. Why do you ask us, ask your PG, simple type explain select ... from ... where field_a in ( 100, 250, 289 ) PG shows you the execution plan. But i guess, the index are not used, because the value 100 are not in the index. Andreas -- Andreas Kretschmer Kontakt: Heynitz: 035242/47150, D1: 0160/7141639 (mehr: -> Header) GnuPG-ID: 0x3FFF606C, privat 0x7F4584DA http://wwwkeys.de.pgp.net