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 5E92F3A3CE2 for ; Wed, 10 Nov 2004 10:17:57 +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 84340-08 for ; Wed, 10 Nov 2004 10:17:50 +0000 (GMT) Received: from trofast.sesse.net (trofast.sesse.net [129.241.93.32]) by svr1.postgresql.org (Postfix) with ESMTP id DBC523A3C55 for ; Wed, 10 Nov 2004 10:17:50 +0000 (GMT) Received: from sesse by trofast.sesse.net with local (Exim 3.36 #1 (Debian)) id 1CRpXv-0005xL-00 for ; Wed, 10 Nov 2004 11:17:47 +0100 Date: Wed, 10 Nov 2004 11:17:47 +0100 From: "Steinar H. Gunderson" To: pgsql-performance@postgresql.org Subject: Re: simple select-statement takes more than 25 sec Message-ID: <20041110101747.GB22780@uio.no> Mail-Followup-To: pgsql-performance@postgresql.org References: <1100079350.3980.18.camel@Knoppix> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1100079350.3980.18.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.3 tagged_above=0.0 required=5.0 tests=UPPERCASE_25_50 X-Spam-Level: X-Archive-Number: 200411/165 X-Sequence-Number: 9119 On Wed, Nov 10, 2004 at 10:35:50AM +0100, Cao Duy wrote: > here is my simple select-statement: > SELECT * FROM CUSTOMER WHERE CUSTOMER_ID=5 It seems like you're missing an index on customer_id. Set it to PRIMARY KEY or do an explicit CREATE INDEX (followed by an ANALYZE) and it should be a lot faster. /* Steinar */ -- Homepage: http://www.sesse.net/