X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 29F1B56536 for ; Tue, 22 Mar 2005 18:55:11 +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 36466-03 for ; Tue, 22 Mar 2005 18:55:01 +0000 (GMT) Received: from ceroriesgo.co.cr (unknown [200.91.71.251]) by svr1.postgresql.org (Postfix) with ESMTP id BF78356799 for ; Tue, 22 Mar 2005 18:54:59 +0000 (GMT) Received: from [192.168.0.110] by ceroriesgo.co.cr (MDaemon.PRO.v7.2.3.R) with ESMTP id md50000015515.msg for ; Tue, 22 Mar 2005 12:55:30 -0800 Message-ID: <42406A05.6020008@ceroriesgo.co.cr> Date: Tue, 22 Mar 2005 12:55:01 -0600 From: Sabio - PSQL User-Agent: Mozilla Thunderbird 1.0 (X11/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: PostgreSQL Admin Subject: Re: Too slow References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Authenticated-Sender: slopez@ceroriesgo.co.cr X-Spam-Processed: ceroriesgo.co.cr, Tue, 22 Mar 2005 12:55:30 -0800 (not processed: message from valid local sender) X-MDRemoteIP: 192.168.0.110 X-Return-Path: slopez_pg@ceroriesgo.co.cr X-MDaemon-Deliver-To: pgsql-admin@postgresql.org X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.233 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200503/353 X-Sequence-Number: 16851 PG version = 8.0 over Linux Fedora Core 3 PostgreSQL was compiled from source Lee Wu wrote: >PG version? > >Maybe worth to try NOT EXISTS instead of NOT IN > >-----Original Message----- >From: pgsql-admin-owner@postgresql.org >[mailto:pgsql-admin-owner@postgresql.org] On Behalf Of Sabio - PSQL >Sent: Tuesday, March 22, 2005 7:23 AM >To: PostgreSQL Admin >Subject: [ADMIN] Too slow > >How can I improve speed on my queries. For example this query takes one >day executing itself and it has not finalized !!! >"create table tmp_partes as select * from partes where identificacion >not in (select cedula from sujetos)" > >partes have 1888000 rows, an index on identificacion >sujetos have 5500000 rows, an index on cedula > > > > > >---------------------------(end of broadcast)--------------------------- >TIP 4: Don't 'kill -9' the postmaster > > > >