X-Original-To: pgsql-performance@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id D195A476302 for ; Sun, 11 May 2003 10:08:30 -0400 (EDT) Received: from anchor-post-35.mail.demon.net (anchor-post-35.mail.demon.net [194.217.242.85]) by postgresql.org (Postfix) with ESMTP id D1D5A4758F1 for ; Sun, 11 May 2003 10:08:29 -0400 (EDT) Received: from mwynhau.demon.co.uk ([193.237.186.96] helo=mainbox.archonet.com) by anchor-post-35.mail.demon.net with esmtp (Exim 3.36 #2) id 19ErVB-0005pZ-0Z; Sun, 11 May 2003 15:08:33 +0100 Received: from localhost (localhost.localdomain [127.0.0.1]) by mainbox.archonet.com (Postfix) with ESMTP id 3D52916202; Sun, 11 May 2003 15:08:32 +0100 (BST) Received: from client.archonet.com (client.archonet.com [192.168.1.16]) by mainbox.archonet.com (Postfix) with ESMTP id 86C26161F1; Sun, 11 May 2003 15:08:31 +0100 (BST) Content-Type: text/plain; charset="iso-8859-1" From: Richard Huxton Organization: Archonet Ltd To: Xevi Serrats , pgsql-performance@postgresql.org Subject: Re: Yet another question about not use on indexes Date: Sun, 11 May 2003 15:08:34 +0100 User-Agent: KMail/1.4.3 References: <20030511131600.47686.qmail@web13001.mail.yahoo.com> In-Reply-To: <20030511131600.47686.qmail@web13001.mail.yahoo.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200305111508.34714.dev@archonet.com> X-Virus-Scanned: by AMaViS snapshot-20020531 X-Spam-Status: No, hits=-34.9 required=5.0 tests=BAYES_10,EMAIL_ATTRIBUTION,IN_REP_TO,REFERENCES, REPLY_WITH_QUOTES,USER_AGENT_KMAIL autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200305/122 X-Sequence-Number: 1901 On Sunday 11 May 2003 2:16 pm, Xevi Serrats wrote: > Hi, > > I have created a table whit some indexes. I analize > the query of this table and never use index. > pfc=3D# \d document > Table > "public.document" > Column | Type | > Modifiers > ------------+--------------------------+---------------------------------= -- >----------------- codi | integer | not null > default nextval('seq_document'::text) > nom | character varying(32) | not null etc... > pfc=3D# explain select * from document where codi=3D2; > QUERY PLAN > ---------------------------------------------------------- > Seq Scan on document (cost=3D0.00..1.19 rows=3D1 > width=3D120) > Filter: (codi =3D 2) > (2 rows) 1. Have you done a VACUUM ANALYSE? 2. How many rows are in this table? 3. Can you post the output of EXPLAIN ANALYSE SELECT... - that actually run= s=20 the query. --=20 Richard Huxton