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 95CBD3A2D50 for ; Wed, 10 Nov 2004 09:36:07 +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 69309-10 for ; Wed, 10 Nov 2004 09:35:55 +0000 (GMT) Received: from dom3.intranet.online.de (intranet.online.de [212.227.34.162]) by svr1.postgresql.org (Postfix) with ESMTP id 65A423A3BA0 for ; Wed, 10 Nov 2004 09:35:56 +0000 (GMT) Received: from [10.0.40.48] ([10.0.40.48]) by dom3.intranet.online.de (Lotus Domino Release 5.0.11) with ESMTP id 2004111010404296:118830 ; Wed, 10 Nov 2004 10:40:42 +0100 Subject: simple select-statement takes more than 25 sec From: Cao Duy To: pgsql-performance@postgresql.org Message-Id: <1100079350.3980.18.camel@Knoppix> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 (1.4.5-7) Date: Wed, 10 Nov 2004 10:35:50 +0100 X-MIMETrack: Itemize by SMTP Server on DOMINO3/1&1/DE(Release 5.0.11 |July 24, 2002) at 10.11.2004 10:40:42, Serialize by Router on DOMINO3/1&1/DE(Release 5.0.11 |July 24, 2002) at 10.11.2004 10:40:46, Serialize complete at 10.11.2004 10:40:46 Content-Transfer-Encoding: 7bit Content-Type: text/plain 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/164 X-Sequence-Number: 9118 Hi all I have a table with ca. 4Mio Rows. here is my simple select-statement: SELECT * FROM CUSTOMER WHERE CUSTOMER_ID=5 the result appears after about 27 sec. what's wrong? the same statement on mysql takes 1 milisec. please help here is the structur of the table CREATE TABLE public.customer ( customer_id bigserial NOT NULL, cooperationpartner_id int8 NOT NULL DEFAULT 0::bigint, maincontact_id int8 NOT NULL DEFAULT 0::bigint, companycontact_id int8, def_paymentdetails_id int8, def_paymentsort_id int8, def_invoicing_id int8, int_customernumber varchar(50), ext_customernumber varchar(50), CONSTRAINT customer_pkey PRIMARY KEY (customer_id), CONSTRAINT customer_ibfk_1 FOREIGN KEY (cooperationpartner_id) REFERENCES public.cooperationpartner (cooperationpartner_id) ON UPDATE NO ACTION ON DELETE NO ACTION, CONSTRAINT customer_ibfk_2 FOREIGN KEY (maincontact_id) REFERENCES public.contact (contact_id) ON UPDATE NO ACTION ON DELETE NO ACTION, CONSTRAINT customer_ibfk_3 FOREIGN KEY (companycontact_id) REFERENCES public.contact (contact_id) ON UPDATE NO ACTION ON DELETE NO ACTION, CONSTRAINT customer_ibfk_4 FOREIGN KEY (def_paymentdetails_id) REFERENCES public.paymentdetails (paymentdetails_id) ON UPDATE NO ACTION ON DELETE NO ACTION, CONSTRAINT customer_ibfk_5 FOREIGN KEY (def_paymentsort_id) REFERENCES public.paymentsort (paymentsort_id) ON UPDATE NO ACTION ON DELETE NO ACTION, CONSTRAINT customer_ibfk_6 FOREIGN KEY (def_invoicing_id) REFERENCES public.invoicing (invoicing_id) ON UPDATE NO ACTION ON DELETE NO ACTION ) WITH OIDS;