Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 580039FB2D5 for ; Tue, 3 Oct 2006 11:35:21 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 51296-01 for ; Tue, 3 Oct 2006 11:35:17 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 6A6AC9FB2BF for ; Tue, 3 Oct 2006 11:35:17 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id k93EZD6X025425; Tue, 3 Oct 2006 10:35:13 -0400 (EDT) To: Arnaud Lesauvage cc: pgsql-performance@postgresql.org Subject: Re: Poor performance on very simple query ? In-reply-to: <45224896.7040708@freesurf.fr> References: <45224896.7040708@freesurf.fr> Comments: In-reply-to Arnaud Lesauvage message dated "Tue, 03 Oct 2006 13:25:10 +0200" Date: Tue, 03 Oct 2006 10:35:13 -0400 Message-ID: <25424.1159886113@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.093 tagged_above=0 required=5 tests=AWL, SPF_HELO_PASS, SPF_PASS X-Spam-Level: X-Archive-Number: 200610/39 X-Sequence-Number: 21168 Arnaud Lesauvage writes: > Seq Scan on table1 (cost=0.00..23.69 rows=10 width=35) (actual > time=0.023..0.734 rows=7 loops=1) > Filter: ((gid = 33) OR (gid = 110) OR (gid = 65) OR (gid = 84) > OR (gid = 92) OR (gid = 94) OR (gid = 13) OR (gid = 7) OR (gid = > 68) OR (gid = 41)) > Total runtime: 0.801 ms This will start using the index as soon as the table gets big enough to make it worthwhile. regards, tom lane