Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id 147929FA4C5 for ; Tue, 3 Oct 2006 09:28:02 -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 85382-05 for ; Tue, 3 Oct 2006 12:27:53 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mail.mnc.ch (62-2-77-205.static.cablecom.ch [62.2.77.205]) by postgresql.org (Postfix) with ESMTP id D96B19FB1D7 for ; Tue, 3 Oct 2006 09:27:52 -0300 (ADT) Received: from localhost (localhost [127.0.0.1]) by mail.mnc.ch (Postfix) with ESMTP id E59D6A82C4; Tue, 3 Oct 2006 14:32:28 +0200 (CEST) Received: from mail.mnc.ch ([127.0.0.1]) by localhost (mail.test.lan [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id 10571-02; Tue, 3 Oct 2006 14:32:27 +0200 (CEST) Received: from meuh.mnc.lan (62-2-77-204.static.cablecom.ch [62.2.77.204]) by mail.mnc.ch (Postfix) with ESMTP id 87C3AA829D; Tue, 3 Oct 2006 14:32:27 +0200 (CEST) Received: by meuh.mnc.lan (Postfix, from userid 1000) id C4DA5183732; Tue, 3 Oct 2006 14:27:40 +0200 (CEST) To: Tobias Brox Cc: Arnaud Lesauvage , 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> X-Hashcash: 1:20:061003:tobias@nordicbet.com::RaYgGuHpthK5/Euf:0000000000000000000000000000000000000000028DQ X-Hashcash: 1:20:061003:thewild@freesurf.fr::vHGliT4uO5tNk1vB:00000000000000000000000000000000000000000001H/ X-Hashcash: 1:20:061003:pgsql-performance@postgresql.org::fke+lXxi3tGxmLah:000000000000000000000000000000y8p From: Guillaume Cottenceau Date: 03 Oct 2006 14:27:40 +0200 In-Reply-To: <20061003121709.GF30211@oppetid.no> Message-ID: <87zmcdposj.fsf@meuh.mnc.lan> Lines: 17 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: amavisd-new at mnc.ch X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.135 tagged_above=0 required=5 tests=FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200610/38 X-Sequence-Number: 21167 Tobias Brox writes: > Oh - it is. How can you have a default value on a primary key? Will it you can but it is useless :) foo=# create table bar (uid int primary key default 0, baz text); NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "bar_pkey" for table "bar" CREATE TABLE foo=# insert into bar (baz) values (''); INSERT 217426996 1 foo=# insert into bar (baz) values (''); ERROR: duplicate key violates unique constraint "bar_pkey" -- Guillaume Cottenceau Create your personal SMS or WAP Service - visit http://mobilefriends.ch/