Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 1A6EA9FB411 for ; Tue, 30 Jan 2007 17:19:50 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-new, port 10024) with ESMTP id 84598-01 for ; Tue, 30 Jan 2007 17:19:45 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from bay0-omc1-s1.bay0.hotmail.com (bay0-omc1-s1.bay0.hotmail.com [65.54.246.73]) by postgresql.org (Postfix) with ESMTP id 625789FB3EA for ; Tue, 30 Jan 2007 17:19:45 -0400 (AST) Received: from hotmail.com ([65.55.137.91]) by bay0-omc1-s1.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.2668); Tue, 30 Jan 2007 13:19:43 -0800 Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Tue, 30 Jan 2007 13:19:43 -0800 Message-ID: Received: from 65.55.137.123 by by132fd.bay132.hotmail.msn.com with HTTP; Tue, 30 Jan 2007 21:19:41 GMT X-Originating-IP: [200.91.71.251] X-Originating-Email: [sidarlopez@hotmail.com] X-Sender: sidarlopez@hotmail.com In-Reply-To: <45BFB53E.1040105@blackducksoftware.com> From: =?iso-8859-1?B?U2lkYXIgTPNwZXogQ3J1eg==?= To: pgsql-performance@postgresql.org Cc: tallen@blackducksoftware.com Subject: Re: Very slow queries Date: Tue, 30 Jan 2007 15:19:41 -0600 Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed X-OriginalArrivalTime: 30 Jan 2007 21:19:43.0374 (UTC) FILETIME=[5C1FD2E0:01C744B4] X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200701/436 X-Sequence-Number: 23037 >From: Ted Allen >To: Sidar López Cruz >CC: pgsql-performance@postgresql.org >Subject: Re: [PERFORM] Very slow queries >Date: Tue, 30 Jan 2007 16:14:38 -0500 > >What indexes do those tables have? Any? Yes: TABLE ceroriesgo.patronos ADD CONSTRAINT patronos_pkey PRIMARY KEY(numero_patrono); INDEX salarios_numero_patrono_idx ON ceroriesgo.salarios USING btree (numero_patrono); > >Sidar López Cruz wrote: >>Check this: >> >>query: Delete From ceroriesgo.salarios Where numero_patrono Not In (Select >>numero_patrono From ceroriesgo.patronos) >> >>Seq Scan on salarios (cost=51021.78..298803854359.95 rows=14240077 >>width=6) >> Filter: (NOT (subplan)) >> SubPlan >> -> Materialize (cost=51021.78..69422.58 rows=1032980 width=25) >> -> Seq Scan on patronos (cost=0.00..41917.80 rows=1032980 >>width=25) >> >> >>These query took a day to finish, how or who can improove better >>performance of my PostgreSQL. >> >>_________________________________________________________________ >>Charla con tus amigos en línea mediante MSN Messenger: >>http://messenger.latam.msn.com/ >> >> >>---------------------------(end of broadcast)--------------------------- >>TIP 4: Have you searched our list archives? >> >> http://archives.postgresql.org >> > > >-- > >*Edward Allen* >Software Engineer >Black Duck Software, Inc. > >tallen@blackducksoftware.com >T +1.781.891.5100 x133 >F +1.781.891.5145 >http://www.blackducksoftware.com > _________________________________________________________________ Charla con tus amigos en línea mediante MSN Messenger: http://messenger.latam.msn.com/