Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id A61CA9FB263 for ; Tue, 3 Oct 2006 09:25:35 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 88165-01 for ; Tue, 3 Oct 2006 12:25:32 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from serveurmail01.codata.be (125.123.146.82.ipv4.evonet.be [82.146.123.125]) by postgresql.org (Postfix) with ESMTP id 193369FB1D7 for ; Tue, 3 Oct 2006 09:25:32 -0300 (ADT) Received: from localhost (localhost.localdomain [127.0.0.1]) by serveurmail01.codata.be (Postfix) with ESMTP id D4340A8003; Tue, 3 Oct 2006 14:25:29 +0200 (CEST) X-DSPAM-Result: Innocent X-DSPAM-Processed: Tue Oct 3 14:25:29 2006 X-DSPAM-Confidence: 0.5562 X-DSPAM-Probability: 0.0000 X-DSPAM-Signature: 452256b9227581553011157 X-DSPAM-Factors: 27, X-Virus-Scanned: amavisd-new at Received: from serveurmail01.codata.be ([127.0.0.1]) by localhost (serveurmail01.codata.be [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id WB+h4Yt1bOxI; Tue, 3 Oct 2006 14:25:29 +0200 (CEST) Received: from [192.168.1.201] (unknown [192.168.1.201]) by serveurmail01.codata.be (Postfix) with ESMTP id 297BEA8001; Tue, 3 Oct 2006 14:25:29 +0200 (CEST) Message-ID: <452256B8.9050607@freesurf.fr> Date: Tue, 03 Oct 2006 14:25:28 +0200 From: Arnaud Lesauvage User-Agent: Thunderbird 1.5.0.7 (Windows/20060909) MIME-Version: 1.0 To: Tobias Brox CC: pgsql-performance@postgresql.org Subject: Re: Poor performance on very simple query ? References: <45224896.7040708@freesurf.fr> <20061003121004.GC30211@oppetid.no> <20061003121109.GD30211@oppetid.no> <45225407.7090805@freesurf.fr> <20061003121709.GF30211@oppetid.no> In-Reply-To: <20061003121709.GF30211@oppetid.no> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.335 tagged_above=0 required=5 tests=DNS_FROM_RFC_ABUSE, FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200610/37 X-Sequence-Number: 21166 Tobias Brox wrote: > [Arnaud Lesauvage - Tue at 02:13:59PM +0200] >> Tobias Brox wrote: >> >Oh, the gid is not primary key. I guess I should also apologize for >> >adding noise here :-) >> >> Yes, it is a primary key, but I am the noise maker here ! ;-) > > Oh - it is. How can you have a default value on a primary key? Good question, but I am not the DB designer in that case. > Will it > use the index if you do "analyze"? Is there an index on the table at > all, do you get it up if you ask for a description of the table (\d > tablename)? In this case (a simplified version of the real case), the pkey is the only index. It is used if I only as for one row (WHERE gid=33).