X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 509BA3A3E22 for ; Wed, 10 Nov 2004 11:45:37 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 11599-09 for ; Wed, 10 Nov 2004 11:45:28 +0000 (GMT) Received: from trofast.sesse.net (trofast.sesse.net [129.241.93.32]) by svr1.postgresql.org (Postfix) with ESMTP id 333993A3F50 for ; Wed, 10 Nov 2004 11:45:29 +0000 (GMT) Received: from sesse by trofast.sesse.net with local (Exim 3.36 #1 (Debian)) id 1CRquj-0006Ax-00 for ; Wed, 10 Nov 2004 12:45:25 +0100 Date: Wed, 10 Nov 2004 12:45:25 +0100 From: "Steinar H. Gunderson" To: pgsql-performance@postgresql.org Subject: Re: simple select-statement takes more than 25 sec Message-ID: <20041110114525.GB23500@uio.no> Mail-Followup-To: pgsql-performance@postgresql.org References: <1100079350.3980.18.camel@Knoppix> <20041110101747.GB22780@uio.no> <1100085737.3980.43.camel@Knoppix> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1100085737.3980.43.camel@Knoppix> X-Operating-System: Linux 2.6.8.1 on a i686 User-Agent: Mutt/1.5.6+20040907i X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200411/168 X-Sequence-Number: 9122 On Wed, Nov 10, 2004 at 12:22:17PM +0100, Cao Duy wrote: > there is an index on customer_id > > create table customer( > ... > CONSTRAINT customer_pkey PRIMARY KEY (customer_id), > ... > ) Oh, sorry, I missed it among all the foreign keys. :-) Anyhow, as others have pointed out, try doing a select against 5::bigint instead of just 5 (which is an integer). /* Steinar */ -- Homepage: http://www.sesse.net/