Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id AFF4F9FB388 for ; Tue, 30 Jan 2007 17:09:32 -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 78776-10 for ; Tue, 30 Jan 2007 17:09:27 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from bay0-omc1-s7.bay0.hotmail.com (bay0-omc1-s7.bay0.hotmail.com [65.54.246.79]) by postgresql.org (Postfix) with ESMTP id 704219FA29C for ; Tue, 30 Jan 2007 17:09:27 -0400 (AST) Received: from hotmail.com ([65.55.137.84]) by bay0-omc1-s7.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.2668); Tue, 30 Jan 2007 13:09:25 -0800 Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Tue, 30 Jan 2007 13:09:25 -0800 Message-ID: Received: from 65.55.137.123 by by132fd.bay132.hotmail.msn.com with HTTP; Tue, 30 Jan 2007 21:09:23 GMT X-Originating-IP: [200.91.71.251] X-Originating-Email: [sidarlopez@hotmail.com] X-Sender: sidarlopez@hotmail.com From: =?iso-8859-1?B?U2lkYXIgTPNwZXogQ3J1eg==?= To: pgsql-performance@postgresql.org Subject: Very slow queries Date: Tue, 30 Jan 2007 15:09:23 -0600 Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed X-OriginalArrivalTime: 30 Jan 2007 21:09:25.0787 (UTC) FILETIME=[EC0386B0:01C744B2] X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=1.167 tagged_above=0 required=5 tests=BAYES_20, DNS_FROM_RFC_ABUSE, DNS_FROM_RFC_POST, MSGID_FROM_MTA_HEADER, SPF_PASS X-Spam-Level: * X-Archive-Number: 200701/435 X-Sequence-Number: 23036 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/